[BUGFIX] Failing task "Fileadmin garbage collection" 39/54839/4
authorSebastian Hofer <sebastian.hofer@marit.ag>
Tue, 28 Nov 2017 18:25:29 +0000 (19:25 +0100)
committerBenni Mack <benni@typo3.org>
Tue, 28 Nov 2017 22:11:33 +0000 (23:11 +0100)
Fix the identifier string, which is used to retrive the file object,
a relative path instead of an absolute path is expected.

Releases: 7.6
Fixes: #82672
Change-Id: I8786330f07996f1b341bb38fafa50709d364d25e
Reviewed-on: https://review.typo3.org/54839
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Manuel Selbach <manuel_selbach@yahoo.de>
Tested-by: Manuel Selbach <manuel_selbach@yahoo.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/scheduler/Classes/Task/RecyclerGarbageCollectionTask.php

index 9c5258c..52b69df 100644 (file)
@@ -90,7 +90,9 @@ class RecyclerGarbageCollectionTask extends \TYPO3\CMS\Scheduler\Task\AbstractTa
             }
             // Remove files from _recycler_ that where moved to this folder for more than 'number of days'
             if ($file->isFile() && $timestamp > $file->getCTime()) {
-                $fileObject = ResourceFactory::getInstance()->getFileObjectFromCombinedIdentifier($filePath);
+                $fileObject = ResourceFactory::getInstance()->getFileObjectFromCombinedIdentifier(
+                    substr($fileName, strlen(PATH_site))
+                );
                 $fileObject->delete();
             }
         }