bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Fwd: [regression] tar mess up \ and \\ files


From: Sergey Poznyakoff
Subject: Re: [Bug-tar] Fwd: [regression] tar mess up \ and \\ files
Date: Sun, 02 Mar 2014 21:33:49 +0200

Hi Markus,

> Nowhere it mentions that unquoting is restricted to filenames read
> with -T. From the documentation I'd guess that unquoting applies to
> filenames from the command line, too.

Yes, indeed, the unquoting is applied to names obtained from the command
line as well, and as I said in my previous post that's the way tar
operated at least since v. 1.13.
 
> So what behavior is intended?

My feeling is that unquoting file names obtained as arguments is rather
pointless.  They should indeed be treated literally.  Although this can
easily be fixed (see the attached patch), I'm afraid that the fix itself
might break compatibility with some existing applications that use tar. 

Regards,
Sergey

>From 499b05e2855c954527819757077321b5b030e6e4 Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <address@hidden>
Date: Sun, 2 Mar 2014 21:14:39 +0200
Subject: [PATCH] Don't unquote file names received from the command line.

* src/names.c (name_next_elt): Don't unquote NELT_NAME content.
---
 src/names.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/names.c b/src/names.c
index 9fc0ad5..88163d5 100644
--- a/src/names.c
+++ b/src/names.c
@@ -589,8 +589,6 @@ name_next_elt (int change_dirs)
          /* fall through */
        case NELT_NAME:
          copy_name (ep);
-         if (unquote_option)
-           unquote_string (name_buffer);
          entry.type = ep->type;
          entry.v.name = name_buffer;
          name_list_advance ();
--
1.7.12.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]