Skip to content

Commit a108ce4

Browse files
committed
modified function move to use mv
1 parent b9927da commit a108ce4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

server/lib/classes/system.inc.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -935,11 +935,10 @@ function copy($file1, $file2) {
935935
}
936936

937937
function move($file1, $file2) {
938-
$result = $this->copy($file1, $file2);
939-
if($result) {
940-
$result &= $this->unlink($file1);
941-
}
942-
return $result;
938+
$cmd = 'mv ? ?';
939+
$this->exec_safe($cmd, $file1, $file2);
940+
$return_var = $this->last_exec_retcode();
941+
return $return_var == 0 ? true : false;
943942
}
944943

945944
function touch($file, $allow_symlink = false){

0 commit comments

Comments
 (0)