Index: Slim/Utils/Misc.pm =================================================================== --- Slim/Utils/Misc.pm (revision 3144) +++ Slim/Utils/Misc.pm (working copy) @@ -412,9 +412,14 @@ } $fixed = fixPath($file); } else { - $fixed = fixPath(catfile($base, $file)); + if (Slim::Utils::OSDetect::OS() eq "win") { + #rel2abs will convert ../../ paths correctly only for windows + my ($vol,$path,$fn) = splitpath($file); + $fixed = fixPath(rel2abs($path,$base)); + } else { + $fixed = fixPath(stripRel(catfile($base, $file))); + } } - } elsif (file_name_is_absolute($file)) { $fixed = $file; } else { @@ -432,6 +437,17 @@ } } +sub stripRel { + my $file = shift; + + while ($file =~ m#[\/\\]\.\.[\/\\]#) { + $file =~ s#([\/\\])\w+[\/\\]\.\.[\///]#$1#isg; + } + + $::d_paths && msg("stripRel result: $file\n"); + return $file; +} + sub ascendVirtual { my $curVP = shift; my @components = splitdir($curVP);