MTrack/SCM/WorkingCopy.php
[web.mtrack] / MTrack / SCM / WorkingCopy.php
index c8c21d2..a9f8a9e 100644 (file)
@@ -33,15 +33,24 @@ abstract class MTrack_SCM_WorkingCopy {
     {
         if (strlen($this->dir) > 1) {
             require_once 'System.php';
-            echo "rmdir {$this->dir}";
-            
-            System::rm('-r', $this->dir);
+            //System::rm('-r', $this->dir);
         }
     }
     function generateTempDir()
     {
         
-        
+        $tn =  '/var/lib/php5/mtrackworkingdirlEwD96';
+        if (file_exists($tn)) {
+            echo "TRASH";
+            require_once 'System.php';
+            System::rm('-rf', $tn);
+        }
+        clearstatcache();
+        if (file_exists($tn)) {
+            die("OOPS");
+        }
+        return $tn;
+
         $tn = tempnam(ini_get('session.save_path'),'mtrackworkingdir');
         unlink($tn);
         return $tn;