diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2020-01-22 20:09:16 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2020-01-22 20:09:16 +0530 |
commit | 60dfb79b8d5dfa3e1b3708d2349ee58fe7645b97 (patch) | |
tree | 4513b094e77f4279124b7809f8f0930d4c60399e /src/nnn.c | |
parent | a87be622049622b4a9af411f7cbd552cd7860a43 (diff) | |
download | nnn-60dfb79b8d5dfa3e1b3708d2349ee58fe7645b97.tar.gz |
Check if path exists before trying to create
Diffstat (limited to 'src/nnn.c')
-rw-r--r-- | src/nnn.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -5796,7 +5796,7 @@ static bool setup_config(void) xstrlcpy(plugindir, cfgdir, len); DPRINTF_S(plugindir); - if (!xmktree(plugindir, TRUE)) { + if (access(plugindir, F_OK) && !xmktree(plugindir, TRUE)) { xerror(); return FALSE; } @@ -5808,7 +5808,7 @@ static bool setup_config(void) xstrlcpy(sessiondir, cfgdir, len); DPRINTF_S(sessiondir); - if (!xmktree(sessiondir, TRUE)) { + if (access(sessiondir, F_OK) && !xmktree(sessiondir, TRUE)) { xerror(); return FALSE; } |