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,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