[BUGFIX] Create FAL processing folders on upgrade 22/38622/5
authorDaniel Neugebauer <dneuge@glutrot.de>
Fri, 10 Apr 2015 11:21:47 +0000 (13:21 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 1 Dec 2015 13:32:25 +0000 (14:32 +0100)
The Upgrade Wizard's step to migrate filemounts to FAL storages now
creates all missing processing folders.

This is done implicitely by calling getProcessingFolders() on all
storages, thus not introducing any new code to explicitely perform any
manipulation on the file system. If this is not done during migration
regular API calls may fall into an infinite loop, attempting to re-run
getProcessingFolders() due to isWithinFileMountBoundaries check before
any can be created if ResourceStorage has evaluatePermissions set to
false. See bug #66341 for details.

Resolves: #66341
Releases: 6.2
Change-Id: I5839ffe74439d499594e0e1b93a356aaaaac6aca
Reviewed-on: https://review.typo3.org/38622
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/install/Classes/Updates/FilemountUpdateWizard.php

index b1dd41f..85d2bbc 100644 (file)
@@ -85,7 +85,7 @@ class FilemountUpdateWizard extends AbstractUpdate {
        }
 
        /**
-        * Performs the database update.
+        * Performs the database and folder update.
         *
         * @param array &$dbQueries Queries done in this update
         * @param mixed &$customMessages Custom messages
@@ -98,6 +98,12 @@ class FilemountUpdateWizard extends AbstractUpdate {
                if (is_array($this->sqlQueries) && is_array($dbQueries)) {
                        $dbQueries = array_merge($dbQueries, $this->sqlQueries);
                }
+
+               // Initialize processing folders for all storages
+               foreach ($this->storageRepository->findAll() as $storage) {
+                       $storage->getProcessingFolders();
+               }
+
                $this->markWizardAsDone();
                return TRUE;
        }