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/downloadpull/977/head
parent
65e95ed796
commit
ece954a7a4
|
@ -58,7 +58,13 @@ abstract class ArchiveDownloader extends FileDownloader
|
|||
rename($file, $path . '/' . basename($file));
|
||||
}
|
||||
}
|
||||
rmdir($contentDir);
|
||||
|
||||
if(is_file($contentDir)){
|
||||
unlink($contentDir);
|
||||
}
|
||||
else{
|
||||
rmdir($contentDir);
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
// clean up
|
||||
|
|
Loading…
Reference in New Issue