We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57e3cd6 commit 7a830e4Copy full SHA for 7a830e4
server/lib/classes/system.inc.php
@@ -935,10 +935,18 @@ function copy($file1, $file2) {
935
}
936
937
function move($file1, $file2) {
938
- return copy($file1, $file2);
939
if(file_exists($file1) || is_link($file1)) {
940
- return unlink($file1);
941
- }
+ return copy($file1, $file2);
+ if(file_exists($file2) || is_link($file2)) {
+ return unlink($file1);
942
+ } else {
943
+ $app->log("move failed: couldn't move file/link " .$file1." to ".$file2, LOGLEVEL_DEBUG);
944
+ return false;
945
+ }
946
947
+ $app->log("move failed: " .$file1." doesn't exist.", LOGLEVEL_DEBUG);
948
949
950
951
952
function touch($file, $allow_symlink = false){
0 commit comments