aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-04-04 08:56:45 +0200
committerMax Kellermann <max@duempel.org>2012-04-04 08:56:45 +0200
commit83174de420eb2a63d77a7953081b3fb360ecbc31 (patch)
tree1f37703c650414b8ab08316fcb6c6fbafac71b97 /src
parent8ff0197a4391a43ea932f7f4218e14d2e259c087 (diff)
downloadmpd-83174de420eb2a63d77a7953081b3fb360ecbc31.tar.gz
mpd-83174de420eb2a63d77a7953081b3fb360ecbc31.tar.xz
mpd-83174de420eb2a63d77a7953081b3fb360ecbc31.zip
update: properly skip symlinks in path that is to be updated.
Diffstat (limited to '')
-rw-r--r--src/update_walk.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/update_walk.c b/src/update_walk.c
index 03fa78456..5d2f778ff 100644
--- a/src/update_walk.c
+++ b/src/update_walk.c
@@ -848,6 +848,9 @@ directory_make_child_checked(struct directory *parent, const char *path)
return NULL;
}
+ if (skip_symlink(parent, path))
+ return NULL;
+
/* if we're adding directory paths, make sure to delete filenames
with potentially the same name */
conflicting = songvec_find(&parent->songs, base);
@@ -896,7 +899,8 @@ updatePath(const char *path)
name = g_path_get_basename(path);
- if (stat_directory_child(parent, name, &st) == 0)
+ if (!skip_symlink(parent, name) &&
+ stat_directory_child(parent, name, &st) == 0)
updateInDirectory(parent, name, &st);
else
delete_name_in(parent, name);