Skip to content

Commit

Permalink
Added ability to set resolution strategy for copy and move conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdejonge committed Oct 19, 2023
1 parent ec7383f commit e7381ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LocalFilesystemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public function move(string $source, string $destination, Config $config): void
);

if ( ! @rename($sourcePath, $destinationPath)) {
throw UnableToMoveFile::fromLocationTo($sourcePath, $destinationPath);
throw UnableToMoveFile::because(error_get_last()['message'] ?? 'unknown reason', $source, $destination);
}
}

Expand All @@ -263,7 +263,7 @@ public function copy(string $source, string $destination, Config $config): void
);

if ( ! @copy($sourcePath, $destinationPath)) {
throw UnableToCopyFile::fromLocationTo($sourcePath, $destinationPath);
throw UnableToCopyFile::because(error_get_last()['message'] ?? 'unknown', $source, $destination);
}
}

Expand Down

0 comments on commit e7381ef

Please sign in to comment.