]> source.dussan.org Git - nextcloud-server.git/commitdiff
set size and unencrypted size to zero on fopen
authorBjoern Schiessle <schiessle@owncloud.com>
Mon, 20 Apr 2015 08:47:40 +0000 (10:47 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Mon, 20 Apr 2015 09:06:13 +0000 (11:06 +0200)
lib/private/files/stream/encryption.php

index 9ba98e61d3eeaa786b1a50130477c7f4891469e2..08ca54a17139938c52a935ce6b3306eb16cf5d34 100644 (file)
@@ -223,9 +223,8 @@ class Encryption extends Wrapper {
                        || $mode === 'wb+'
                ) {
                        // We're writing a new file so start write counter with 0 bytes
-                       // TODO can we remove this completely?
-                       //$this->unencryptedSize = 0;
-                       //$this->size = 0;
+                       $this->unencryptedSize = 0;
+                       $this->size = 0;
                        $this->readOnly = false;
                } else {
                        $this->readOnly = true;