Browse Source

Bugfix.

* src/incremen.c (make_directory): Retain the slash if it is the
only character in a filename.
Sergey Poznyakoff 15 years ago
parent
commit
e21d54e8cd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/incremen.c

+ 1 - 1
src/incremen.c

@@ -258,7 +258,7 @@ make_directory (const char *name, char *caname)
   directory->dump = directory->idump = NULL;
   directory->orig = NULL;
   directory->flags = false;
-  if (namelen && ISSLASH (name[namelen - 1]))
+  if (namelen > 1 && ISSLASH (name[namelen - 1]))
     namelen--;
   directory->name = xmalloc (namelen + 1);
   memcpy (directory->name, name, namelen);