Skip to content

Commit

Permalink
Follow symlinks (to regular files) when adding folders. Closes: #892
Browse files Browse the repository at this point in the history
  • Loading branch information
jlindgren90 committed Dec 5, 2020
1 parent 256952f commit 571f141
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libaudcore/adder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ static void add_folder(const char * filename, Playlist::FilterFunc filter,
if (error)
AUDERR("%s: %s\n", (const char *)file, (const char *)error);

if (mode & VFS_IS_SYMLINK)
// to prevent infinite recursion, skip symlinks to folders
if ((mode & (VFS_IS_SYMLINK | VFS_IS_DIR)) == (VFS_IS_SYMLINK | VFS_IS_DIR))
continue;

if (mode & VFS_IS_REGULAR)
Expand Down

1 comment on commit 571f141

@jparsons2222
Copy link

@jparsons2222 jparsons2222 commented on 571f141 Mar 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing 4.1, I cannot use symbolic links to folders and I suspect that your logic may be faulty closing this feature request since the bug/feature Feature #892 was asking to have an option to follow symbolic links to folders?

Please sign in to comment.