aboutsummaryrefslogtreecommitdiffstats
path: root/src/update_walk.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-07-20 21:46:05 +0200
committerMax Kellermann <max@duempel.org>2011-07-20 21:46:05 +0200
commit0ea4c970d794d535ae6efb4d0ae2d3fe37980ae3 (patch)
treed08d18c852febad9d6da94dfbe31545dcf93b5d0 /src/update_walk.c
parent57936a13741c09fa54a33a53ed05ac0d996e4807 (diff)
parent838f7cd210dbd3f071d48d54c168c123c3d20c58 (diff)
downloadmpd-0ea4c970d794d535ae6efb4d0ae2d3fe37980ae3.tar.gz
mpd-0ea4c970d794d535ae6efb4d0ae2d3fe37980ae3.tar.xz
mpd-0ea4c970d794d535ae6efb4d0ae2d3fe37980ae3.zip
Merge branch 'v0.16.x'
Conflicts: src/player_thread.c src/playlist_control.c
Diffstat (limited to 'src/update_walk.c')
-rw-r--r--src/update_walk.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/update_walk.c b/src/update_walk.c
index e5ab4fc37..e70ead173 100644
--- a/src/update_walk.c
+++ b/src/update_walk.c
@@ -714,8 +714,14 @@ skip_symlink(const struct directory *directory, const char *utf8_name)
return false;
}
- if (buffer[0] == '/')
- return !follow_outside_symlinks;
+ if (g_path_is_absolute(buffer)) {
+ /* if the symlink points to an absolute path, see if
+ that path is inside the music directory */
+ const char *relative = map_to_relative_path(buffer);
+ return relative > buffer
+ ? !follow_inside_symlinks
+ : !follow_outside_symlinks;
+ }
p = buffer;
while (*p == '.') {