Index: /Users/mh/Documents/workspace/SC7.0/Slim/Utils/OSDetect.pm =================================================================== --- /Users/mh/Documents/workspace/SC7.0/Slim/Utils/OSDetect.pm (revision 17007) +++ /Users/mh/Documents/workspace/SC7.0/Slim/Utils/OSDetect.pm (working copy) @@ -181,25 +181,17 @@ } elsif ($dir eq 'log') { # If SqueezeCenter is installed systemwide. - if (-d "/Library/Application Support/SqueezeCenter") { + if (-d "/Library/Application Support/SqueezeCenter" && -w "/Library/Logs") { - mkpath("/Library/Logs/SqueezeCenter"); + push @dirs, "/Library/Logs/SqueezeCenter"; } else { - mkpath("$ENV{'HOME'}/Library/Logs/SqueezeCenter"); + push @dirs, catdir("$ENV{'HOME'}/Library/Logs/SqueezeCenter"); } - if (-d "/Library/Application Support/SqueezeCenter") { - - push @dirs, "/Library/Logs/SqueezeCenter"; - - } elsif (-d "$ENV{'HOME'}/Library/Logs/SqueezeCenter") { - - push @dirs, "$ENV{'HOME'}/Library/Logs/SqueezeCenter"; - - } + mkpath($dirs[-1]) } elsif ($dir eq 'cache') {