From: uid65697 Date: Thu, 25 Dec 2003 10:19:40 +0000 (+0000) Subject: (safer_name_suffix): Reverted change made 2003-11-14. Reason: Discussion with Paul... X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=f30c03c934e5ba865c966cb7add6542ec5f1a68f;p=chaz%2Ftar (safer_name_suffix): Reverted change made 2003-11-14. Reason: Discussion with Paul Eggert and Jean-Louis Martineau. See also ChangeLog entry from 1999-08-14. --- diff --git a/src/names.c b/src/names.c index 5cb1aa5..6fc5ee5 100644 --- a/src/names.c +++ b/src/names.c @@ -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;