aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/directory.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/directory.c b/src/directory.c
index 6a203b9c1..9e2db4495 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -991,6 +991,8 @@ int checkDirectoryDB(void)
* see if we can write a file in that */
char dirPath[MPD_PATH_MAX];
parent_path(dirPath, dbFile);
+ if (*dirPath == '\0')
+ strcpy(dirPath, "/");
/* Check that the parent part of the path is a directory */
if (stat(dirPath, &st) < 0) {