aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 3be84dcb52f..abb142175d5 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1379,7 +1379,8 @@ See also the function `substitute-in-file-name'.")
1379 { 1379 {
1380 while (o != target && (--o) && !IS_DIRECTORY_SEP (*o)) 1380 while (o != target && (--o) && !IS_DIRECTORY_SEP (*o))
1381 ; 1381 ;
1382 if (o == target && IS_ANY_SEP (*o)) 1382 /* Keep initial / only if this is the whole name. */
1383 if (o == target && IS_ANY_SEP (*o) && p[3] == 0)
1383 ++o; 1384 ++o;
1384 p += 3; 1385 p += 3;
1385 } 1386 }