summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/dirname.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dirname.c b/lib/dirname.c
index 109eccc2c..9fb5f0937 100644
--- a/lib/dirname.c
+++ b/lib/dirname.c
@@ -53,7 +53,7 @@ char *
dir_name (char const *path)
{
size_t length = dir_len (path);
- int append_dot = (length == FILESYSTEM_PREFIX_LEN (newpath));
+ int append_dot = (length == FILESYSTEM_PREFIX_LEN (path));
char *newpath = xmalloc (length + append_dot + 1);
memcpy (newpath, path, length);
if (append_dot)