Skip to content

Commit

Permalink
Update VueFinder.php
Browse files Browse the repository at this point in the history
  • Loading branch information
n1crack committed Sep 27, 2022
1 parent a12fcee commit 8f57df7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/VueFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,13 @@ public function move()

$items = json_decode($this->request->get('items'));

foreach ($items as $item) {
$target = $to.DIRECTORY_SEPARATOR.basename($item->path);
if ($this->manager->fileExists($target)) {
throw new Exception('One of the files is already exists.');
}
}

foreach ($items as $item) {
$target = $to.DIRECTORY_SEPARATOR.basename($item->path);

Expand Down

0 comments on commit 8f57df7

Please sign in to comment.