aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-10-12 13:43:15 +0100
committerRon Yorston <rmy@pobox.com>2021-10-12 13:43:15 +0100
commitb4b2b2c4fbba12561c5e988177bef699be306b26 (patch)
treeaf6ee5b26f0f775264eb8afb1af63415818e2a7e /shell
parent0d127fbf4bbcd09f36740019ef129851464f8660 (diff)
downloadbusybox-w32-b4b2b2c4fbba12561c5e988177bef699be306b26.tar.gz
busybox-w32-b4b2b2c4fbba12561c5e988177bef699be306b26.tar.bz2
busybox-w32-b4b2b2c4fbba12561c5e988177bef699be306b26.zip
win32: rename is_absolute_path()
As the comment pointed out is_absolute_path() was misnamed. Rename it to is_relative_path() and change the sense of all tests.
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 487e477a3..9214982c1 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -344,7 +344,7 @@ typedef long arith_t;
344#endif 344#endif
345 345
346#if !ENABLE_PLATFORM_MINGW32 346#if !ENABLE_PLATFORM_MINGW32
347# define is_absolute_path(path) ((path)[0] == '/') 347# define is_relative_path(path) ((path)[0] != '/')
348#endif 348#endif
349 349
350#if !BB_MMU 350#if !BB_MMU
@@ -3379,7 +3379,7 @@ cdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
3379 } 3379 }
3380 if (!dest) 3380 if (!dest)
3381 dest = nullstr; 3381 dest = nullstr;
3382 if (is_absolute_path(dest)) 3382 if (!is_relative_path(dest))
3383 goto step6; 3383 goto step6;
3384 if (*dest == '.') { 3384 if (*dest == '.') {
3385 c = dest[1]; 3385 c = dest[1];
@@ -14728,7 +14728,7 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path)
14728 } 14728 }
14729 } 14729 }
14730 /* if rehash, don't redo absolute path names */ 14730 /* if rehash, don't redo absolute path names */
14731 if (is_absolute_path(fullname) && idx <= prev) { 14731 if (!is_relative_path(fullname) && idx <= prev) {
14732 if (idx < prev) 14732 if (idx < prev)
14733 continue; 14733 continue;
14734 TRACE(("searchexec \"%s\": no change\n", name)); 14734 TRACE(("searchexec \"%s\": no change\n", name));