aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-10-27 22:06:28 +0100
committerMax Kellermann <max@duempel.org>2009-10-27 22:06:28 +0100
commitd083032236dc05f00a9bfab201537083f7bb10b4 (patch)
tree219845d16865615df70dd583b5416a6e43b2285c
parent1a6ed811935916b8cc27d9eeb7f3be3413e643f7 (diff)
downloadmpd-d083032236dc05f00a9bfab201537083f7bb10b4.tar.gz
mpd-d083032236dc05f00a9bfab201537083f7bb10b4.tar.xz
mpd-d083032236dc05f00a9bfab201537083f7bb10b4.zip
update: delete ignored symlinks from database
When you disable the "follow_outside_symlinks" or the "follow_inside_symlinks" setting, the next update should remove the now-ignored files from the database.
Diffstat (limited to '')
-rw-r--r--NEWS1
-rw-r--r--src/update.c6
2 files changed, 6 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 12574dd23..bc2b7f9c0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
ver 0.15.6 (2009/??/??)
* output_thread: check again if output is open on PAUSE
+* update: delete ignored symlinks from database
ver 0.15.5 (2009/10/18)
diff --git a/src/update.c b/src/update.c
index 24960b449..d5c9779c8 100644
--- a/src/update.c
+++ b/src/update.c
@@ -672,7 +672,11 @@ updateDirectory(struct directory *directory, const struct stat *st)
continue;
utf8 = fs_charset_to_utf8(ent->d_name);
- if (utf8 == NULL || skip_symlink(directory, utf8)) {
+ if (utf8 == NULL)
+ continue;
+
+ if (skip_symlink(directory, utf8)) {
+ delete_name_in(directory, utf8);
g_free(utf8);
continue;
}