Fix for single-file archives, for example http://sourceforge.net/projects/rssphp/files/rssphp/v1/rss_php.v1.zip/download
@@ -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