diff options
Diffstat (limited to 'src/common/compat.c')
-rw-r--r-- | src/common/compat.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index 3c5e9385e2..fc066da681 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -1481,7 +1481,12 @@ get_parent_directory(char *fname) fname += 2; } #endif - /* Now we want to remove the final character that */ + /* Now we want to remove all path-separators at the end of the string, + * and to remove the end of the string starting with the path separator + * before the last non-path-separator. In perl, this would be + * s#[/]*$##; s#/[^/]*$##; + * on a unixy platform. + */ cp = fname + strlen(fname); at_end = 1; while (--cp > fname) { |