From 5a7ca9106a305555922ef78c2dd84ab8779c7718 Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Sat, 30 Jan 2021 14:21:42 -0500 Subject: fixed warnings on GCC, fixed opening an absolute path, README --- ui.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'ui.c') 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'; -- cgit v1.2.3