Skip to content

Commit

Permalink
$targetArchive doesn't exist in this method. Looks like it should be …
Browse files Browse the repository at this point in the history
…$destFile
  • Loading branch information
rlerdorf committed Apr 29, 2013
1 parent 30cff4a commit 681fc48
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Mage/Connect/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,13 @@ public function convertPearToMage($sourceFile, $destFile = false)
$mageObject->save(getcwd());
@chdir($cwd);
$filename = $outDir. DS . $mageObject->getReleaseFilename().".tgz";
if(@file_exists($targetArchive)) {
@unlink($targetArchive);
if(@file_exists($destFile)) {
@unlink($destFile);
}
Mage_System_Dirs::mkdirStrict(dirname($destFile));
$copy = @copy($filename, $destFile);
if(false === $copy) {
throw new Exception("Cannot copy '{$filename}' to '{$targetArchive}'");
throw new Exception("Cannot copy '{$filename}' to '{$destFile}'");
}
Mage_System_Dirs::rm($tempDir);
Mage_System_Dirs::rm($outDir);
Expand All @@ -334,4 +334,4 @@ public function convertPearToMage($sourceFile, $destFile = false)



}
}

0 comments on commit 681fc48

Please sign in to comment.