Skip to content

Commit 12a21d4

Browse files
committed
commit current code
1 parent 115ac27 commit 12a21d4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/lib/classes/system.inc.php

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

937937
function move($file1, $file2) {
938-
if(file_exists($file1) || is_link($file1)) {
938+
if(file_exists($file1) || is_link($file1) && is_dir(realpath(dirname($file2)))) {
939939
if(copy($file1, $file2)) {
940940
return unlink($file1);
941941
} else {
942-
$app->log("move failed: couldn't move file/link " .$file1." to ".$file2, LOGLEVEL_DEBUG);
942+
$app->log("move failed: couldn't move file/link " .$file1. " to " .$file2, LOGLEVEL_DEBUG);
943943
return false;
944944
}
945945
} else {
946-
$app->log("move failed: source " .$file1." doesn't exist.", LOGLEVEL_DEBUG);
946+
$app->log("move failed: source " .$file1. " doesn't exist.", LOGLEVEL_DEBUG);
947947
return false;
948948
}
949949
}

0 commit comments

Comments
 (0)