1
0
Fork 0

Update src/Composer/Downloader/ArchiveDownloader.php

Fix for single-file archives, for example http://sourceforge.net/projects/rssphp/files/rssphp/v1/rss_php.v1.zip/download
pull/977/head
Артём Курапов 2012-08-05 02:38:47 +03:00
parent 65e95ed796
commit ece954a7a4
1 changed files with 7 additions and 1 deletions

View File

@ -58,8 +58,14 @@ abstract class ArchiveDownloader extends FileDownloader
rename($file, $path . '/' . basename($file)); rename($file, $path . '/' . basename($file));
} }
} }
if(is_file($contentDir)){
unlink($contentDir);
}
else{
rmdir($contentDir); rmdir($contentDir);
} }
}
} catch (\Exception $e) { } catch (\Exception $e) {
// clean up // clean up
$this->filesystem->removeDirectory($path); $this->filesystem->removeDirectory($path);