We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 115ac27 commit 12a21d4Copy full SHA for 12a21d4
1 file changed
server/lib/classes/system.inc.php
@@ -935,15 +935,15 @@ function copy($file1, $file2) {
935
}
936
937
function move($file1, $file2) {
938
- if(file_exists($file1) || is_link($file1)) {
+ if(file_exists($file1) || is_link($file1) && is_dir(realpath(dirname($file2)))) {
939
if(copy($file1, $file2)) {
940
return unlink($file1);
941
} else {
942
- $app->log("move failed: couldn't move file/link " .$file1." to ".$file2, LOGLEVEL_DEBUG);
+ $app->log("move failed: couldn't move file/link " .$file1. " to " .$file2, LOGLEVEL_DEBUG);
943
return false;
944
945
946
- $app->log("move failed: source " .$file1." doesn't exist.", LOGLEVEL_DEBUG);
+ $app->log("move failed: source " .$file1. " doesn't exist.", LOGLEVEL_DEBUG);
947
948
949
0 commit comments