X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=MTrack%2FSCM%2FWorkingCopy.php;h=df9f59607b066caf954a4058f776e3e5bfae6a4b;hb=8463f92bf949ca2ff163006958b7fe9e03958f49;hp=171bfad23ae8790d7e7739ebd7d83a168153d122;hpb=9d725d4ee9d78b99d6038502edd5f619b6479934;p=web.mtrack diff --git a/MTrack/SCM/WorkingCopy.php b/MTrack/SCM/WorkingCopy.php index 171bfad2..df9f5960 100644 --- a/MTrack/SCM/WorkingCopy.php +++ b/MTrack/SCM/WorkingCopy.php @@ -33,17 +33,26 @@ abstract class MTrack_SCM_WorkingCopy { { if (strlen($this->dir) > 1) { require_once 'System.php'; + //System::rm('-r', $this->dir); } } + + function rmdir($dir) { + require_once 'System.php'; + $rm = System::which('rm'); + $cmd = "$rm -rf " . escapeshellarg($dir); + `$cmd`; + + + } + function generateTempDir() { $tn = '/var/lib/php5/mtrackworkingdirlEwD96a'; if (file_exists($tn)) { - echo "TRASH"; - require_once 'System.php'; - var_dump(System::rm('-rf', $tn)); + $this->rmdir($tn); } clearstatcache(); if (file_exists($tn)) {