[Jifty-commit] r6718 - jifty/trunk/lib/Jifty/Script

Jifty commits jifty-commit at lists.jifty.org
Tue Mar 31 13:18:04 EDT 2009


Author: alexmv
Date: Tue Mar 31 13:18:04 2009
New Revision: 6718

Modified:
   jifty/trunk/lib/Jifty/Script/Server.pm

Log:
Only clean out mason cache if we have a mason view handler

Modified: jifty/trunk/lib/Jifty/Script/Server.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Script/Server.pm	(original)
+++ jifty/trunk/lib/Jifty/Script/Server.pm	Tue Mar 31 13:18:04 2009
@@ -141,12 +141,8 @@
 
     Jifty::Util->require($server_class);
 
-    if (-d $data_dir) {
-        File::Path::rmtree(["$data_dir/cache", "$data_dir/obj"]);
-    }
-    else {
-        File::Path::mkpath([$data_dir]);
-    }
+    File::Path::rmtree(["$data_dir/cache", "$data_dir/obj"])
+          if Jifty->handler->view('Jifty::View::Mason::Handler') and -d $data_dir;
 
     $SIG{TERM} = sub { exit };
     open my $fh, '>', PIDFILE or die $!;


More information about the Jifty-commit mailing list