Skip to content

Commit

Permalink
Bug fix for alchemy-fr#133 (correcting file_exists path)
Browse files Browse the repository at this point in the history
  • Loading branch information
violuke authored May 17, 2017
1 parent 2c231a0 commit e52760e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Adapter/ZipExtensionAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ protected function doExtractMembers(ResourceInterface $resource, $members, $to,
}

if ($overwrite == false) {
if (file_exists($member)) {
$fileToCheck = ($to != '' && substr($to, 0, -1) != DIRECTORY_SEPARATOR ? $to.DIRECTORY_SEPARATOR : $to) . $member;
if (file_exists($fileToCheck)) {
$resource->getResource()->close();

throw new RuntimeException('Target file ' . $member . ' already exists.');
Expand Down

0 comments on commit e52760e

Please sign in to comment.