Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-08-26 11:23:03 +0300
committerVincent Petry <vincent@nextcloud.com>2021-08-26 15:20:04 +0300
commit2032ca7457c8bce02148240c5086e6bb2c622aea (patch)
tree425c787538c0c0aa1bb8b2e9bde2812eb3ae5f45 /lib
parentfd6c5a134ffe63c1f880723a6b85ab1c124e2eec (diff)
Unregister enc stream wrapper for any exception
This prevents side effects in tests by properly cleaning up even with expected exceptions. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Stream/Encryption.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Stream/Encryption.php b/lib/private/Files/Stream/Encryption.php
index 16d2ca3ce97..fc75ead1e45 100644
--- a/lib/private/Files/Stream/Encryption.php
+++ b/lib/private/Files/Stream/Encryption.php
@@ -213,7 +213,7 @@ class Encryption extends Wrapper {
} else {
$wrapped = fopen($protocol . '://', $mode, false, $context);
}
- } catch (\BadMethodCallException $e) {
+ } catch (\Exception $e) {
stream_wrapper_unregister($protocol);
throw $e;
}