summaryrefslogtreecommitdiff
path: root/src/pwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pwd.c')
-rw-r--r--src/pwd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pwd.c b/src/pwd.c
index 9fd8515a4..3a7ff5aac 100644
--- a/src/pwd.c
+++ b/src/pwd.c
@@ -279,8 +279,9 @@ robust_getcwd (struct file_name *file_name)
find_dir_entry (&dot_sb, file_name, height++);
}
+ /* See if a leading slash is needed; file_name_prepend adds one. */
if (file_name->start[0] == '\0')
- file_name_prepend (file_name, "/", 1);
+ file_name_prepend (file_name, "", 0);
}
int