From e21d54e8cd3d8026ad56f90cc6bde831106c2cb9 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Mon, 17 May 2010 20:22:16 +0300 Subject: [PATCH] Bugfix. * src/incremen.c (make_directory): Retain the slash if it is the only character in a filename. --- src/incremen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/incremen.c b/src/incremen.c index dc880cd..0d0b4ff 100644 --- a/src/incremen.c +++ b/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); -- 2.45.2