aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-01-03 07:32:59 +0000
committerEric Wong <normalperson@yhbt.net>2008-01-03 07:32:59 +0000
commit776ccc89ad20f4532a4f28d98be775c0e1ba66aa (patch)
tree25add87dab6162c162b4f61755620f39f09cff75 /src
parentcb8f1af3bd5056109bfbe75faf568430a5121bda (diff)
downloadmpd-776ccc89ad20f4532a4f28d98be775c0e1ba66aa.tar.gz
mpd-776ccc89ad20f4532a4f28d98be775c0e1ba66aa.tar.xz
mpd-776ccc89ad20f4532a4f28d98be775c0e1ba66aa.zip
directory: allow db_file to reside on / once again
Oops!, I went back and documented the change going to parent_path(), but forgot to change the code that was affected by it. git-svn-id: https://svn.musicpd.org/mpd/trunk@7131 09075e82-0dd4-0310-85a5-a0d7c8717e4f
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) {