summaryrefslogtreecommitdiff
path: root/ui.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-01-30 14:21:42 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-01-30 14:21:42 -0500
commit5a7ca9106a305555922ef78c2dd84ab8779c7718 (patch)
treefe35f09c8ff1b0880196425333013a3526b4eed2 /ui.c
parented8a56cc65411b8d00e4a8a9366855ea101f2e27 (diff)
fixed warnings on GCC, fixed opening an absolute path, README
Diffstat (limited to 'ui.c')
-rw-r--r--ui.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ui.c b/ui.c
index 058f76b..26f56cd 100644
--- a/ui.c
+++ b/ui.c
@@ -186,11 +186,7 @@ static Status file_selector_cd_(Ted const *ted, FileSelector *fs, char const *pa
char *const cwd = fs->cwd;
if (path[0] == '\0') return true;
- if (path[0] == PATH_SEPARATOR
- #if _WIN32
- || path[1] == ':' && path[2] == PATH_SEPARATOR
- #endif
- ) {
+ if (path_is_absolute(path)) {
// absolute path (e.g. /foo, c:\foo)
// start out by replacing cwd with the start of the absolute path
cwd[0] = '\0';