diff options
author | Max Kellermann <max@duempel.org> | 2008-10-09 15:42:30 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-11 19:21:50 -0700 |
commit | 017e2e4a4e8e8b60446cd90fe3d7ab1b3165572e (patch) | |
tree | 2e4197904742ed1b34153dd1d727b38b81e5eb4b /src | |
parent | 8aed358a9770618c93c0b33417f2b62fbb9a513e (diff) | |
download | mpd-017e2e4a4e8e8b60446cd90fe3d7ab1b3165572e.tar.gz mpd-017e2e4a4e8e8b60446cd90fe3d7ab1b3165572e.tar.xz mpd-017e2e4a4e8e8b60446cd90fe3d7ab1b3165572e.zip |
update: clear root after error
When the root directory fails to update, its contents are invalid.
Clear it then.
Diffstat (limited to 'src')
-rw-r--r-- | src/update.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/update.c b/src/update.c index 6697a14c2..564e691d0 100644 --- a/src/update.c +++ b/src/update.c @@ -388,6 +388,7 @@ static enum update_return updatePath(const char *utf8path) } /* we don't want to delete the root directory */ else if (directory == db_get_root()) { + clear_directory(directory); return UPDATE_RETURN_NOUPDATE; } /* if updateDirectory fails, means we should delete it */ |