mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Check if path exists before trying to create
This commit is contained in:
parent
a87be62204
commit
60dfb79b8d
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue