Bugzilla – Bug 2757
option to not follow symlinks or duplicate awareness with symlinks
Last modified: 2014-11-29 17:17:48 UTC
Looking through the bug database you may want to join this together with #1372. Basically there is a symlink to a file that also exists in the music folder, so two copies of it show up in the library. This is useful for creating file organizational trees rather than playlists and not having to create copies of the files. To solve my particular issue I've been manually adding a patch to Slim/Utils/Misc.pm by inserting the following on line 607; if ( -l $fullpath ) { next; } My thought was to see if a simple config variable could be wrapped around that. But I see bug #1372 looks to resolve the final path of the symlink, and then ignore it if it's already known. This would work equally well to the above *if* symlinks were evaluated last, or gone back through and removed.. It might even work better than the above for people who symlink within the music folder *and* to files outside the music folder.
this should already be fixed. please try the latest nightly builds). as a good rule of thumb, nightlies are worth checking before filing a bug report.
(In reply to comment #1) > this should already be fixed. please try the latest nightly builds). as a > good rule of thumb, nightlies are worth checking before filing a bug report. No, it is not fixed in the nightlies. I'm seeing duplicates of symlinks and their source files.
Dan: are we detecting symlinks?
Mike - does this patch fix the problem for you? --- Slim/Utils/Misc.pm (revision 12309) +++ Slim/Utils/Misc.pm (local) @@ -421,6 +421,10 @@ if (!Slim::Music::Info::isFileURL($fixed)) { $fixed = canonpath(fixPathCase($fixed)); + + if (-l $fixed) { + $fixed = readlink($fixed); + } }
Mike - does the patch work for you? Thanks
Mike, is this patch good for you?
Fixed in change 8079
This bug fix is now part of a released version, and so has been marked closed. If you are still experiencing this problem, please reopen the bug.
Many years later... I've been seeing this issue with all of the latest released versions (7.x). Currently using 7.7.5. Not sure if it's some edge case with my set up: Hardware: Sheevaplug Software: Debian package 7.7.5. Music catalogue stored on external USB drive, connected to Sheevaplug. External USB drive is formatted as NTFS; mounted using ntfs-3g. Example of directory structure: Music | +--Artist1 | | | +--Album1 | | | Track1 | ... | ... | +--<symlink to Artist1> The tracks are appearing twice in the media server under this set up. A (bash) console on my Sheevaplug quite happily creates (and reports) the symlinks on the NTFS drive, but I wonder if the resolution to canonical path does not work?