Skip to content

Commit

Permalink
fixes #2179
Browse files Browse the repository at this point in the history
  • Loading branch information
Elorfin committed Aug 16, 2022
1 parent 37f1623 commit ac476f8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/transfer/Manager/TransferManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,12 @@ public function export(ExportFile $exportFile): string
{
$fs = new FileSystem();

$exportPath = $this->fileManager->getDirectory().'/transfer'.'/'.$exportFile->getUuid();
$exportDir = $this->fileManager->getDirectory().DIRECTORY_SEPARATOR.'transfer'.DIRECTORY_SEPARATOR;
if (!$fs->exists($exportDir)) {
$fs->mkdir($exportDir);
}

$exportPath = $exportDir.$exportFile->getUuid();
if ($fs->exists($exportPath)) {
$fs->remove($exportPath);
}
Expand All @@ -148,7 +153,7 @@ public function export(ExportFile $exportFile): string
$fs->touch($exportPath);

$this->exporter->execute(
$this->fileManager->getDirectory().'/transfer'.'/'.$exportFile->getUuid(),
$exportPath,
$exportFile->getFormat(),
$exportFile->getAction(),
$options,
Expand Down

0 comments on commit ac476f8

Please sign in to comment.