浏览代码

Bugfix.

* src/incremen.c (make_directory): Retain the slash if it is the
only character in a filename.
Sergey Poznyakoff 15 年之前
父节点
当前提交
e21d54e8cd
共有 1 个文件被更改,包括 1 次插入1 次删除
  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);