Changeset 2083
- Timestamp:
- 01/22/08 03:30:23 (10 months ago)
- Files:
-
- alternc/trunk/bureau/class/m_bro.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
alternc/trunk/bureau/class/m_bro.php
r2082 r2083 523 523 $src = $this->convertabsolute($src); 524 524 $dest = $this->convertabsolute($dest); 525 if (!$src || !$dest) { 526 $err->raise("bro",1); 527 return false; 528 } 525 529 $src = escapeshellarg($src); 526 530 $dest = escapeshellarg($dest); 527 if (!$src || !$dest) { 528 $err->raise("bro",1); 529 return false; 530 } 531 /* XXX: UNIX-specific because of that slash */ 532 $array = explode('/', $dest); 533 $dir = ""; 534 foreach ($array as $v) { 535 $dir .= "$v/"; 536 @mkdir($dest); 537 } 538 #TODO write a recursive copy function(?) 539 exec("cp -Rpf '$src'/* '$dest'", $void, $ret); 531 // TODO: write a recursive copy function(?) 532 exec("cp -Rpf '$src' '$dest'", $void, $ret); 540 533 if ($ret) { 541 $err->raise("bro","Errors happened while copying the source to destination. ");534 $err->raise("bro","Errors happened while copying the source to destination. cp return value: %d", $ret); 542 535 return false; 543 536 }
