1
0
Fork 0

Make sure directories we are downloading to are empty

We already clear them on error anyway and usually they should be
empty, but just to be safe.
pull/2210/merge
Nils Adermann 2013-08-31 15:42:26 +02:00
parent 4b38158185
commit a080ae3a51
1 changed files with 1 additions and 0 deletions

View File

@ -79,6 +79,7 @@ class FileDownloader implements DownloaderInterface
throw new \InvalidArgumentException('The given package is missing url information');
}
$this->filesystem->removeDirectory($path);
$this->filesystem->ensureDirectoryExists($path);
$fileName = $this->getFileName($package, $path);