aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Storage/Wrapper/Encryption.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php
index 308952c2a31..3ee715ae3d3 100644
--- a/lib/private/Files/Storage/Wrapper/Encryption.php
+++ b/lib/private/Files/Storage/Wrapper/Encryption.php
@@ -784,8 +784,12 @@ class Encryption extends Wrapper {
fclose($source);
fclose($target);
} catch (\Exception $e) {
- fclose($source);
- fclose($target);
+ if (is_resource($source)) {
+ fclose($source);
+ }
+ if (is_resource($target)) {
+ fclose($target);
+ }
throw $e;
}
if ($result) {