(dir_name): Compute append_dot using path, not newpath
authorJim Meyering <jim@meyering.net>
Mon, 21 May 2001 06:36:36 +0000 (06:36 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 21 May 2001 06:36:36 +0000 (06:36 +0000)
which is not yet declared.

lib/dirname.c

index 109eccc..9fb5f09 100644 (file)
@@ -53,7 +53,7 @@ char *
 dir_name (char const *path)
 {
   size_t length = dir_len (path);
-  int append_dot = (length == FILESYSTEM_PREFIX_LEN (newpath));
+  int append_dot = (length == FILESYSTEM_PREFIX_LEN (path));
   char *newpath = xmalloc (length + append_dot + 1);
   memcpy (newpath, path, length);
   if (append_dot)