Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update patch extfs for diffutils 3.3 change #3851

Open
mc-butler opened this issue Sep 1, 2017 · 2 comments
Open

update patch extfs for diffutils 3.3 change #3851

mc-butler opened this issue Sep 1, 2017 · 2 comments
Labels
area: vfs Virtual File System support prio: low Minor problem or easily worked around ver: 4.8.19 Reproducible in version 4.8.19

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3851
Reporter mnk (galtgendo@….pl)

It seem this somewhat corner case was missed a few years ago.

The NEWS snippet:

A file name containing spaces, double quotes, backslashes or control
characters is now encoded in a diff header as a double-quoted C string
literal. The escape sequences \\, \", \a, \b, \f, \n, \r, \t, \v and
\ooo (a three-digit octal number between 0 and 255) are used.

So, this case isn't covered by patchfs.in, resulting sometimes in a non-working vfs getting created.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Sep 2, 2017 at 4:18 UTC (comment 1)

  • Component changed from mc-core to mc-vfs

@mc-butler
Copy link
Author

Changed by mnk (galtgendo@….pl) on Sep 3, 2017 at 11:52 UTC (comment 2)

I don't know perl, following is just a result of googling.

It seems that putting following in patchfs_canonicalize_path makes things somewhat working (meaning they aren't broken in an obvious way, though can't say what happens for names actually starting with '"' or containing backslashes...though if I'm reading the snippet correctly, that shouldn't happen):

  $fname =~ s,^"(.*)"$,$1,;
  $fname =~ s[\\(?:([0-7]{1,3})|(.))] [defined($1) ? chr(oct($1)) : $2]eg;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: vfs Virtual File System support prio: low Minor problem or easily worked around ver: 4.8.19 Reproducible in version 4.8.19
Development

No branches or pull requests

1 participant