Bug 444 - cachedir default not properly set on Unix
: cachedir default not properly set on Unix
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: 5.x or older
: Other Debian Linux
: P2 normal (vote)
: ---
Assigned To: Blackketter Dean
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-07-12 12:52 UTC by Rob Funk
Modified: 2008-12-18 11:51 UTC (History)
0 users

See Also:
Category: ---


Attachments
patch setting default cachedir on Unix to the home directory (646 bytes, patch)
2004-07-12 12:54 UTC, Rob Funk
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Funk 2004-07-12 12:52:51 UTC
There is now a --cachedir command line option for telling the server where to 
store the cache.  If that option is not given, the defaultCacheDir() function 
in Utils/Prefs.pm is supposed to determine a reasonable default.  However, on 
Unix systems it doesn't manage to do so. 
 
The following patch sets the Unix default cachedir to the home directory. 
 
Index: Prefs.pm 
=================================================================== 
RCS file: /cvsroot/slim/server/Slim/Utils/Prefs.pm,v 
retrieving revision 1.76 
diff -u -r1.76 Prefs.pm 
--- Prefs.pm    7 Jul 2004 03:38:18 -0000       1.76 
+++ Prefs.pm    12 Jul 2004 19:45:58 -0000 
@@ -68,8 +68,11 @@ 
 
 sub defaultCacheDir { 
        my $CacheDir = catdir($Bin,'Cache'); 
-       if (Slim::Utils::OSDetect::OS() eq 'mac') { 
+       my $os = Slim::Utils::OSDetect::OS(); 
+       if ($os eq 'mac') { 
                $CacheDir = catdir($ENV{'HOME'}, 
'/Library/Caches/SlimServer'); 
+       } elsif ($os eq 'unix') { 
+               $CacheDir = $ENV{'HOME'}; 
        } 
        my @CacheDirs = splitdir($CacheDir); 
        pop @CacheDirs;
Comment 1 Rob Funk 2004-07-12 12:54:01 UTC
Created attachment 66 [details]
patch setting default cachedir on Unix to the home directory
Comment 2 Blackketter Dean 2004-08-12 09:46:12 UTC
patch accepted for next nightly.
Comment 3 Chris Owens 2006-06-16 14:40:25 UTC
There are 536 bugs in the database with targets of '---' that were fixed prior to new year 2006.  I am setting them to targets of 6.2.1 to keep them from showing up in my queries.
Comment 4 Chris Owens 2008-12-18 11:51:19 UTC
Routine bug db maintenance; removing old versions which cause confusion.  I apologize for the inconvenience.