Your message dated Mon,  4 Feb 2019 13:13:53 -0700 (MST)
with message-id <[email protected]>
and subject line expected behavior
has caused the Debian Bug report #597577,
regarding tar cannot smoothly handle weird filenames
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
597577: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597577
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: tar
Version: 1.23-2.1

GNU tar exits with error when trying to process the filename
 
   '\fhd =' (without quotes)

For instance, the command

   tar vzcf file.tar.gz '\fhd ='

exits with the following error:

   tar: \fhd =: Cannot stat: No such file or directory
   tar: Exiting with failure status due to previous errors

But the file actually exists; the command

   stat '\fhd ='

returns
  
   File: `\\fhd ='
   Size: 0            Blocks: 0          IO Block: 4096   regular empty file
   Device: 813h/2067d   Inode: 28180652    Links: 1
   Access: (0644/-rw-r--r--)  Uid: ( 1000/ douglas)   Gid: ( 1000/ douglas)
   Access: 2008-08-20 20:20:58.000000000 -0300
   Modify: 2008-07-26 06:17:36.000000000 -0300
   Change: 2010-09-20 18:38:54.096946555 -0300

However, when the backslash of the weird filename is escaped, tar works as
expected:

   tar vzcf file.tar.gz '\\fhd ='
   \\fhd =

Since other utilities (like stat, ls, and so on) work promptly with '\fhd =',
I don't think that an additional backslash should be necessary. Moreover, the
tar's behavior precludes it from being used this way:

   tar vzcf file.tar.gz *

   (the above command exits with error if the weird filename is in the current
    directory)


PS: The reported problem was observed on the following shells: bash (4.1.5),
zsh (4.3.10), and dash (0.5.5.1). I'm using Debian GNU/Linux unstable.

-- 
Douglas A. Augusto



--- End Message ---
--- Begin Message ---
Upstream points out that --unquote is on by default in tar, making this
an expected behavior, in that the \f is translated to an ASCII form-feed
character, and so on.

To handle filenames with backslashes like this, use the --no-unquote
option to disable unquoting.

Bdale

--- End Message ---

Reply via email to