Skip to content

Commit

Permalink
[BUGFIX] Initialize rFALd properly before any publishing action for e…
Browse files Browse the repository at this point in the history
…ach file
  • Loading branch information
vertexvaar committed Nov 30, 2016
1 parent e74b6c1 commit 7280d2c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Classes/Domain/Service/Publishing/FilePublisherService.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public function __construct()
public function removeForeignFile($storage, $fileIdentifier)
{
$this->remoteFalDriver->setStorageUid($storage);
$this->remoteFalDriver->initialize();

return $this->remoteFalDriver->deleteFile($fileIdentifier);
}

Expand All @@ -73,6 +75,9 @@ public function removeForeignFile($storage, $fileIdentifier)
*/
public function addFileToForeign($storage, $fileIdentifier)
{
$this->remoteFalDriver->setStorageUid($storage);
$this->remoteFalDriver->initialize();

$temporaryIdentifier = $this->transferTemporaryFile($storage, $fileIdentifier);

$folderIdentifier = dirname($fileIdentifier);
Expand All @@ -96,9 +101,11 @@ public function addFileToForeign($storage, $fileIdentifier)
*/
public function updateFileOnForeign($storage, $fileIdentifier)
{
$this->remoteFalDriver->setStorageUid($storage);
$this->remoteFalDriver->initialize();

$temporaryIdentifier = $this->transferTemporaryFile($storage, $fileIdentifier);

$this->remoteFalDriver->setStorageUid($storage);
return $this->remoteFalDriver->replaceFile($fileIdentifier, $temporaryIdentifier);
}

Expand All @@ -111,6 +118,8 @@ public function updateFileOnForeign($storage, $fileIdentifier)
public function renameForeignFile($storage, $fileIdentifier, $newName)
{
$this->remoteFalDriver->setStorageUid($storage);
$this->remoteFalDriver->initialize();

return $this->remoteFalDriver->renameFile($fileIdentifier, $newName);
}

Expand Down

0 comments on commit 7280d2c

Please sign in to comment.