Skip to content

Commit 7544918

Browse files
committed
[VD:core] Check if copying was successful when moving files in copy + delete mode
ref. 071b5ab#commitcomment-149967981
1 parent 7084b55 commit 7544918

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

php/elFinderVolumeDriver.class.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5332,9 +5332,8 @@ protected function move($src, $dst, $name)
53325332
$res = $this->convEncOut($this->_move($this->convEncIn($src), $this->convEncIn($dst), $this->convEncIn($name)));
53335333
// if moving it didn't work try to copy / delete
53345334
if (!$res) {
5335-
$res = $this->copy($src, $dst, $name);
5336-
if (!$this->remove($src)) {
5337-
$res = false;
5335+
if ($this->copy($src, $dst, $name)) {
5336+
$res = $this->remove($src);
53385337
}
53395338
}
53405339

0 commit comments

Comments
 (0)