update_walk: apply follow_inside_symlinks to absolute symlinks
This commit is contained in:
parent
2e28ed8f81
commit
b2175629fd
1
NEWS
1
NEWS
|
@ -1,6 +1,7 @@
|
||||||
ver 0.16.4 (2011/??/??)
|
ver 0.16.4 (2011/??/??)
|
||||||
* fix memory leaks
|
* fix memory leaks
|
||||||
* don't resume playback when seeking to another song while paused
|
* don't resume playback when seeking to another song while paused
|
||||||
|
* apply follow_inside_symlinks to absolute symlinks
|
||||||
* decoder:
|
* decoder:
|
||||||
- ffmpeg: workaround for semantic API change in recent ffmpeg versions
|
- ffmpeg: workaround for semantic API change in recent ffmpeg versions
|
||||||
- flac: validate the sample rate when scanning the tag
|
- flac: validate the sample rate when scanning the tag
|
||||||
|
|
|
@ -714,8 +714,14 @@ skip_symlink(const struct directory *directory, const char *utf8_name)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buffer[0] == '/')
|
if (g_path_is_absolute(buffer)) {
|
||||||
return !follow_outside_symlinks;
|
/* 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;
|
p = buffer;
|
||||||
while (*p == '.') {
|
while (*p == '.') {
|
||||||
|
|
Loading…
Reference in New Issue