From 7544918a2ba656a4fe72a6fc8bb502d39f601cda Mon Sep 17 00:00:00 2001 From: nao-pon Date: Thu, 5 Dec 2024 21:55:50 +0900 Subject: [PATCH] [VD:core] Check if copying was successful when moving files in copy + delete mode ref. https://github.com/Studio-42/elFinder/commit/071b5ab33ce3583a1f57fa140a6f0b4e3ef12550#commitcomment-149967981 --- php/elFinderVolumeDriver.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/php/elFinderVolumeDriver.class.php b/php/elFinderVolumeDriver.class.php index bc36889d1..e9ac3ce40 100644 --- a/php/elFinderVolumeDriver.class.php +++ b/php/elFinderVolumeDriver.class.php @@ -5332,9 +5332,8 @@ protected function move($src, $dst, $name) $res = $this->convEncOut($this->_move($this->convEncIn($src), $this->convEncIn($dst), $this->convEncIn($name))); // if moving it didn't work try to copy / delete if (!$res) { - $res = $this->copy($src, $dst, $name); - if (!$this->remove($src)) { - $res = false; + if ($this->copy($src, $dst, $name)) { + $res = $this->remove($src); } }