From: Sergey Poznyakoff Date: Mon, 17 May 2010 17:22:16 +0000 (+0300) Subject: Bugfix. X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=e21d54e8cd3d8026ad56f90cc6bde831106c2cb9;p=chaz%2Ftar Bugfix. * src/incremen.c (make_directory): Retain the slash if it is the only character in a filename. --- 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);