diff --git a/php/elFinderVolumeBox.class.php b/php/elFinderVolumeBox.class.php index 5e6f729bd..2a21634f1 100644 --- a/php/elFinderVolumeBox.class.php +++ b/php/elFinderVolumeBox.class.php @@ -1501,6 +1501,10 @@ class elFinderVolumeBox extends elFinderVolumeDriver curl_close($curl); if ($result && isset($result->id)) { + if ($type === 'folders' && isset($this->sessionCache['subdirs'])) { + $this->sessionCache['subdirs'][$targetDir] = true; + } + return $this->_joinPath($targetDir, $result->id); } diff --git a/php/elFinderVolumeDriver.class.php b/php/elFinderVolumeDriver.class.php index cf6eb208b..c2d2b4640 100644 --- a/php/elFinderVolumeDriver.class.php +++ b/php/elFinderVolumeDriver.class.php @@ -4199,6 +4199,9 @@ abstract class elFinderVolumeDriver { if ($res = $this->convEncOut($this->_move($this->convEncIn($src), $this->convEncIn($dst), $this->convEncIn($name)))) { $this->removed[] = $stat; + if (isset($this->sessionCache['subdirs']) && $stat['mime'] === 'directory') { + $this->sessionCache['subdirs'][$dst] = true; + } return is_string($res)? $res : $this->joinPathCE($dst, $name); } diff --git a/php/elFinderVolumeOneDrive.class.php b/php/elFinderVolumeOneDrive.class.php index b890fd755..fc9f0bb1a 100644 --- a/php/elFinderVolumeOneDrive.class.php +++ b/php/elFinderVolumeOneDrive.class.php @@ -1465,6 +1465,10 @@ class elFinderVolumeOneDrive extends elFinderVolumeDriver } if ($res && isset($res->id)) { + if (isset($res->folder) && isset($this->sessionCache['subdirs'])) { + $this->sessionCache['subdirs'][$targetDir] = true; + } + return $this->_joinPath($targetDir, $res->id); } @@ -1494,7 +1498,6 @@ class elFinderVolumeOneDrive extends elFinderVolumeDriver list(, $targetParentId) = $this->_od_splitPath($targetDir); list($sourceParentId, $itemId, $srcParent) = $this->_od_splitPath($source); - $srcFile = $this->stat($source); $properties = array( 'name' => (string) $name, );