diff options
author | Ron Yorston <rmy@pobox.com> | 2022-04-30 11:35:20 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2022-04-30 11:40:27 +0100 |
commit | ae61e126ee8e8200e87f285d9c410eb377505578 (patch) | |
tree | 9292c7a0c3e91eb56b449915fe8f0ffa820f9d5b | |
parent | ff0494394e1d26b2e6f2483daed81d2d477d6525 (diff) | |
download | busybox-w32-ae61e126ee8e8200e87f285d9c410eb377505578.tar.gz busybox-w32-ae61e126ee8e8200e87f285d9c410eb377505578.tar.bz2 busybox-w32-ae61e126ee8e8200e87f285d9c410eb377505578.zip |
win32: clarify documentation of is_relative_path()
-rw-r--r-- | win32/mingw.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/win32/mingw.c b/win32/mingw.c index 2de07122e..063a0c546 100644 --- a/win32/mingw.c +++ b/win32/mingw.c | |||
@@ -2117,10 +2117,15 @@ int has_path(const char *file) | |||
2117 | has_dos_drive_prefix(file); | 2117 | has_dos_drive_prefix(file); |
2118 | } | 2118 | } |
2119 | 2119 | ||
2120 | /* Test whether a path is relative to a known location (usually the | 2120 | /* |
2121 | * Test whether a path is relative to a known location (usually the | ||
2121 | * current working directory or a symlink). On Unix this is a path | 2122 | * current working directory or a symlink). On Unix this is a path |
2122 | * that doesn't start with a slash but on Windows we also need to | 2123 | * that doesn't start with a slash but on Windows it also includes |
2123 | * exclude paths that start with a backslash or a drive letter. */ | 2124 | * paths that don't start with a backslash or a drive letter. |
2125 | * | ||
2126 | * Paths of the form /dir/file or c:dir/file aren't relative by this | ||
2127 | * definition. | ||
2128 | */ | ||
2124 | int is_relative_path(const char *path) | 2129 | int is_relative_path(const char *path) |
2125 | { | 2130 | { |
2126 | return !is_dir_sep(path[0]) && !has_dos_drive_prefix(path); | 2131 | return !is_dir_sep(path[0]) && !has_dos_drive_prefix(path); |