summaryrefslogtreecommitdiffstats
path: root/owncloud-8.2.3-icewind-streams-encryption.patch
blob: 177aad246106bf944729878473381609894aae1e (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
diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php
index e0d263d..4c32899 100644
--- a/lib/private/files/stream/encryption.php
+++ b/lib/private/files/stream/encryption.php
@@ -471,4 +471,13 @@ protected function parentStreamSeek($position) {
 		return parent::stream_seek($position);
 	}
 
+	/**
+	 * @param string $path
+	 * @param array $options
+	 * @return bool
+	 */
+	public function dir_opendir($path, $options) {
+		return false;
+	}
+
 }
diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php
index 4c32899..585a697 100644
--- a/lib/private/files/stream/encryption.php
+++ b/lib/private/files/stream/encryption.php
@@ -167,7 +167,7 @@ public static function wrap($source, $internalPath, $fullPath, array $header,
 			)
 		));
 
-		return self::wrapSource($source, $mode, $context, 'ocencryption', $wrapper);
+		return self::wrapSource($source, $context, 'ocencryption', $wrapper, $mode);
 	}
 
 	/**
@@ -181,7 +181,7 @@ public static function wrap($source, $internalPath, $fullPath, array $header,
 	 * @return resource
 	 * @throws \BadMethodCallException
 	 */
-	protected static function wrapSource($source, $mode, $context, $protocol, $class) {
+	protected static function wrapSource($source, $context, $protocol, $class, $mode = 'r+') {
 		try {
 			stream_wrapper_register($protocol, $class);
 			if (@rewinddir($source) === false) {