Skip to content

Commit

Permalink
Remove duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwindell committed Mar 22, 2022
1 parent 0256e98 commit add5e50
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions Model/File/Storage/Synchronization.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,6 @@ public function synchronize($relativeFileName)
return;
}

try {
$storage->loadByFilename($relativeFileName);
} catch (\Exception $e) {
}
if ($storage->getId()) {
/** @var WriteInterface $file */
$file = $this->mediaDirectory->openFile($relativeFileName, 'w');
try {
$file->lock();
$file->write($storage->getContent());
$file->unlock();
$file->close();
} catch (FileSystemException $e) {
$file->close();
}
}
$storage->downloadFile($relativeFileName);
}
}

0 comments on commit add5e50

Please sign in to comment.