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 11:52:23 +0300
commit9c6bbfac45923459b5addbefbd3817bda98aa43d (patch)
tree5d163bdcf18495ad3b7ea4998aaf2ce2dd13c430 /lib
parent60e44077b73b49a13b235f8e2d9e6e3b9f4efc6f (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 007ef6f3560..e1233e76b93 100644
--- a/lib/private/Files/Stream/Encryption.php
+++ b/lib/private/Files/Stream/Encryption.php
@@ -212,7 +212,7 @@ class Encryption extends Wrapper {
} else {
$wrapped = fopen($protocol . '://', $mode, false, $context);
}
- } catch (\BadMethodCallException $e) {
+ } catch (\Exception $e) {
stream_wrapper_unregister($protocol);
throw $e;
}