Skip to content

Commit

Permalink
Fix media manager file rename
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge authored and sakiss committed Oct 16, 2020
1 parent 8b0a98a commit a96f47a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ public function putFiles()
$this->getModel()->updateFile($adapter, $name, str_replace($name, '', $path), $mediaContent);
}

list($destinationAdapter, $destinationPath) = explode(':', $newPath, 2);

if ($newPath != null && ($adapter !== $destinationAdapter && str_replace($destinationAdapter . ':', '', $newPath) !== $path))
if ($newPath != null && $newPath !== $adapter . ':' . $path)
{
list($destinationAdapter, $destinationPath) = explode(':', $newPath, 2);

if ($move)
{
$destinationPath = $this->getModel()->move($adapter, $path, $destinationPath, false);
Expand Down

0 comments on commit a96f47a

Please sign in to comment.