]> Dogcows Code - chaz/tar/commitdiff
(safer_name_suffix): Reverted change made 2003-11-14. Reason: Discussion with Paul...
authoruid65697 <uid65697>
Thu, 25 Dec 2003 10:19:40 +0000 (10:19 +0000)
committeruid65697 <uid65697>
Thu, 25 Dec 2003 10:19:40 +0000 (10:19 +0000)
src/names.c

index 5cb1aa544a8588d20f12e75ea4c53e0eb330baba..6fc5ee5105ba68d0ceadde88b1391fa33bbeb516 100644 (file)
@@ -1021,13 +1021,8 @@ safer_name_suffix (char const *file_name, bool link_target)
 
       for (p = file_name + prefix_len; *p; )
        {
-         if (p[0] == '.')
-           {
-             if (p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
-               prefix_len = p + 2 - file_name;
-             else if (ISSLASH (p[1]))
-               prefix_len = p + 1 - file_name;
-           }
+          if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
+           prefix_len = p + 2 - file_name;
          
          do
            {
@@ -1072,8 +1067,8 @@ safer_name_suffix (char const *file_name, bool link_target)
          };
          WARN ((0, 0, _(diagnostic[link_target])));
        }
-
-      p = ISSLASH (file_name[strlen(file_name)-1]) ? "./" : ".";
+      
+      p = ".";
     }
 
   return (char *) p;
This page took 0.022565 seconds and 4 git commands to generate.