[Slim-Checkins] r33706 - /7.7/trunk/server/Slim/Utils/DbCache.pm
| Newsgroups | gmane.music.equipment.slimdevices.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mherger
Date: Mon Nov 14 05:41:49 2011
New Revision: 33706
URL: http://svn.slimdevices.com/slim?rev=33706&view=rev
Log:
Bug: n/a
Description: don't break plugins using a path in the cache's namespace. Replace slashes with dashes.
Modified:
7.7/trunk/server/Slim/Utils/DbCache.pm
Modified: 7.7/trunk/server/Slim/Utils/DbCache.pm
URL: http://svn.slimdevices.com/slim/7.7/trunk/server/Slim/Utils/DbCache.pm?rev=33706&r1=33705&r2=33706&view=diff
==============================================================================
--- 7.7/trunk/server/Slim/Utils/DbCache.pm (original)
+++ 7.7/trunk/server/Slim/Utils/DbCache.pm Mon Nov 14 05:41:49 2011
@@ -191,6 +191,10 @@
# namespace should not be longer than 8 characters on Windows, as it was causing DB corruption
if ( main::ISWINDOWS && length($namespace) > 8 ) {
$namespace = lc(substr($namespace, 0, 4)) . substr(Digest::MD5::md5_hex($namespace), 0, 4);
+ }
+ # some plugins use paths in their namespace - which was compatible with FileCache, but no longer is
+ elsif ( !main::ISWINDOWS ) {
+ $namespace =~ s/\//-/g;
}
return catfile( $self->{root}, $namespace . '.db' );