From 776ccc89ad20f4532a4f28d98be775c0e1ba66aa Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 3 Jan 2008 07:32:59 +0000 Subject: 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 --- src/directory.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3