* src/incremen.c (make_directory): Retain the slash if it is the
only character in a filename.
This commit is contained in:
Sergey Poznyakoff
2010-05-17 20:22:16 +03:00
parent c79f0d06bc
commit e21d54e8cd

View File

@@ -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);