patch_file_replace.diff

Patch file - Dragan Tomic, 2016-12-06 10:04

Download (1.68 KB)

View differences:

typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php
1072 1072
                /** @var $fileObject File */
1073 1073
                $fileObject = $this->getFileObject($combinedIdentifier);
1074 1074

  
1075
                // reading Storage from file, use default as a fallback
1076
                $fileStorageUid = $fileObject ? $fileObject->getStorage()->getUid() : \TYPO3\CMS\Core\Resource\ResourceFactory::getDefaultStorage();
1077

  
1075 1078
                $resourceFactory = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\ResourceFactory');
1076
                $folder = $resourceFactory->getFolderObjectFromCombinedIdentifier('1:'.$fileObject->getParentFolder()->getIdentifier());
1079
                $folder = $resourceFactory->getFolderObjectFromCombinedIdentifier(trim($fileStorageUid . ':' . $fileObject->getParentFolder()->getIdentifier()));
1077 1080

  
1078 1081
                try {
1079 1082
                    $checkFile = $resourceFactory->retrieveFileOrFolderObject($folder->getCombinedIdentifier().''.$fileInfo['name']);
1080
-