Browse Source

(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.

uid65697 21 years ago
parent
commit
f30c03c934
1 changed files with 4 additions and 9 deletions
  1. 4 9
      src/names.c

+ 4 - 9
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;