[Slim-Checkins] r33839 - /7.7/trunk/server/cleanup.pl

[email protected] Wed, 15 Feb 2012 09:30:00 -0000
Newsgroups gmane.music.equipment.slimdevices.cvs
Message-ID <[email protected]>
Author: mherger
Date: Wed Feb 15 01:29:59 2012
New Revision: 33839

URL: http://svn.slimdevices.com/slim?rev=33839&view=rev
Log:
Bug: n/a
Description: don't put legacy folder on the stack unless we really are requested to clean something. Otherwise the GUI wouldn't start on Windows.

Modified:
    7.7/trunk/server/cleanup.pl

Modified: 7.7/trunk/server/cleanup.pl
URL: http://svn.slimdevices.com/slim/7.7/trunk/server/cleanup.pl?rev=33839&r1=33838&r2=33839&view=diff
==============================================================================
--- 7.7/trunk/server/cleanup.pl (original)
+++ 7.7/trunk/server/cleanup.pl Wed Feb 15 01:29:59 2012
@@ -168,25 +168,27 @@
 
 	push @folders, _target('cache', 'cache') if ($args->{all} || $args->{cache});
 	
-	push @folders, {
-		label   => 'some legacy files',
-		folders => [
-			File::Spec::Functions::catdir($cacheFolder, 'MySQL'),
-			File::Spec::Functions::catdir($cacheFolder, 'my.cnf'),
-			File::Spec::Functions::catdir($cacheFolder, 'squeezecenter-mysql.pid'),
-			File::Spec::Functions::catdir($cacheFolder, 'squeezecenter-mysql.sock'),
-			File::Spec::Functions::catdir($cacheFolder, 'mysql-error-log.txt'),
-			File::Spec::Functions::catdir($cacheFolder, 'squeezebox.db'),
-			File::Spec::Functions::catdir($cacheFolder, 'squeezebox.db-shm'),
-			File::Spec::Functions::catdir($cacheFolder, 'squeezebox.db-wal'),
-			File::Spec::Functions::catdir($cacheFolder, 'squeezebox-persistent.db'),
-			File::Spec::Functions::catdir($cacheFolder, 'squeezebox-persistent.db-shm'),
-			File::Spec::Functions::catdir($cacheFolder, 'squeezebox-persistent.db-wal'),
-			File::Spec::Functions::catdir($cacheFolder, 'ArtworkCache.db'),
-			File::Spec::Functions::catdir($cacheFolder, 'ArtworkCache.db-shm'),
-			File::Spec::Functions::catdir($cacheFolder, 'ArtworkCache.db-wal'),
-		],
-	};
+	if ($args->{all} || $args->{prefs} || $args->{cache} || $args->{filecache} || $args->{logs} || $args->{database}) {
+		push @folders, {
+			label   => 'some legacy files',
+			folders => [
+				File::Spec::Functions::catdir($cacheFolder, 'MySQL'),
+				File::Spec::Functions::catdir($cacheFolder, 'my.cnf'),
+				File::Spec::Functions::catdir($cacheFolder, 'squeezecenter-mysql.pid'),
+				File::Spec::Functions::catdir($cacheFolder, 'squeezecenter-mysql.sock'),
+				File::Spec::Functions::catdir($cacheFolder, 'mysql-error-log.txt'),
+				File::Spec::Functions::catdir($cacheFolder, 'squeezebox.db'),
+				File::Spec::Functions::catdir($cacheFolder, 'squeezebox.db-shm'),
+				File::Spec::Functions::catdir($cacheFolder, 'squeezebox.db-wal'),
+				File::Spec::Functions::catdir($cacheFolder, 'squeezebox-persistent.db'),
+				File::Spec::Functions::catdir($cacheFolder, 'squeezebox-persistent.db-shm'),
+				File::Spec::Functions::catdir($cacheFolder, 'squeezebox-persistent.db-wal'),
+				File::Spec::Functions::catdir($cacheFolder, 'ArtworkCache.db'),
+				File::Spec::Functions::catdir($cacheFolder, 'ArtworkCache.db-shm'),
+				File::Spec::Functions::catdir($cacheFolder, 'ArtworkCache.db-wal'),
+			],
+		};
+	}
 	
 	if ($args->{filecache}) {
 		push @folders, {