commit 85baad4c378d359e497eff2206ac083ab2bd1f7e Author: James Hogarth Date: Tue Jul 19 12:37:00 2016 +0100 no need to do a repair of 3rd party diff --git a/lib/private/repair/brokenupdaterrepair.php b/lib/private/repair/brokenupdaterrepair.php index 0e4431f..3ec1027 100644 --- a/lib/private/repair/brokenupdaterrepair.php +++ b/lib/private/repair/brokenupdaterrepair.php @@ -46,47 +46,7 @@ class BrokenUpdaterRepair extends BasicEmitter implements \OC\RepairStep { * @return bool True if action performed, false otherwise */ private function manuallyCopyThirdPartyFiles() { - $resourceDir = __DIR__ . '/../../../resources/updater-fixes/'; - $thirdPartyDir = __DIR__ . '/../../../3rdparty/'; - - $filesToCopy = [ - // Composer updates - 'composer.json', - 'composer.lock', - 'composer/autoload_classmap.php', - 'composer/installed.json', - 'composer/LICENSE', - // Icewind stream library - 'icewind/streams/src/DirectoryFilter.php', - 'icewind/streams/src/DirectoryWrapper.php', - 'icewind/streams/src/RetryWrapper.php', - 'icewind/streams/src/SeekableWrapper.php', - // Sabre update - 'sabre/dav/CHANGELOG.md', - 'sabre/dav/composer.json', - 'sabre/dav/lib/CalDAV/Plugin.php', - 'sabre/dav/lib/CardDAV/Backend/PDO.php', - 'sabre/dav/lib/DAV/CorePlugin.php', - 'sabre/dav/lib/DAV/Version.php', - ]; - - // Check the hash for the autoload_classmap.php file, if the hash does match - // the expected value then the third-party folder has already been copied - // properly. - if(hash_file('sha512', $thirdPartyDir . '/composer/autoload_classmap.php') === 'abe09be19b6d427283cbfa7c4156d2c342cd9368d7d0564828a00ae02c435b642e7092cef444f94635f370dbe507eb6b2aa05109b32d8fb5d8a65c3a5a1c658f') { - $this->emit('\OC\Repair', 'info', ['Third-party files seem already to have been copied. No repair necessary.']); - return false; - } - - foreach($filesToCopy as $file) { - $state = copy($resourceDir . '/' . $file, $thirdPartyDir . '/' . $file); - if($state === true) { - $this->emit('\OC\Repair', 'info', ['Successfully replaced '.$file.' with new version.']); - } else { - $this->emit('\OC\Repair', 'warning', ['Could not replace '.$file.' with new version.']); - } - } - return true; + return false; } /**