summaryrefslogtreecommitdiffstats
path: root/owncloud-9.0.4-no_3rdparty_repairs.patch
blob: e1382d67fc233020e37407c3ceaf4eab8e783540 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
commit 85baad4c378d359e497eff2206ac083ab2bd1f7e
Author: James Hogarth <james.hogarth@gmail.com>
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;
 	}
 
 	/**