aboutsummaryrefslogtreecommitdiffstats
path: root/noice.c
diff options
context:
space:
mode:
Diffstat (limited to 'noice.c')
-rw-r--r--noice.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/noice.c b/noice.c
index ac965bd..8fe0943 100644
--- a/noice.c
+++ b/noice.c
@@ -689,11 +689,12 @@ nochange:
strcmp(path, ".") == 0 ||
strchr(path, '/') == NULL)
goto nochange;
- if (canopendir(path) == 0) {
+ dir = xdirname(path);
+ if (canopendir(dir) == 0) {
+ free(dir);
printwarn();
goto nochange;
}
- dir = xdirname(path);
/* Save history */
oldpath = path;
path = dir;