Skip to content

Commit 28cc123

Browse files
committed
Fixed flysysystem usecase on moving file under the same name would cause a delete
1 parent b259505 commit 28cc123

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/AzureBlobStorageAdapter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ public function move(string $source, string $destination, Config $config): void
262262
{
263263
try {
264264
$this->copy($source, $destination, $config);
265-
$this->delete($source);
265+
if ($source !== $destination) {
266+
$this->delete($source);
267+
}
266268
} catch (\Throwable $e) {
267269
throw UnableToMoveFile::fromLocationTo($source, $destination, $e);
268270
}

0 commit comments

Comments
 (0)