]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix for path_hash not unique as reported at #3641
authorFlorin Peter <github@florin-peter.de>
Thu, 13 Jun 2013 18:52:34 +0000 (20:52 +0200)
committerBjörn Schießle <schiessle@owncloud.com>
Fri, 14 Jun 2013 08:40:44 +0000 (10:40 +0200)
apps/files_encryption/lib/util.php

index a6fd2e8b377e1293fcdfa368307b5b892fe7b44b..f62ec359306a095736401f9853225ee62d4f58b0 100644 (file)
@@ -697,7 +697,7 @@ class Util {
                                $plainHandle = $this->view->fopen($rawPath, 'rb');
 
                                // Open enc file handle for binary writing, with same filename as original plain file
-                               $encHandle = fopen('crypt://' . $relPath . '.tmp', 'wb');
+                               $encHandle = fopen('crypt://' . $relPath . '.part', 'wb');
 
                                // Move plain file to a temporary location
                                $size = stream_copy_to_stream($plainHandle, $encHandle);
@@ -707,7 +707,7 @@ class Util {
                                $fakeRoot = $this->view->getRoot();
                                $this->view->chroot('/' . $this->userId . '/files');
 
-                               $this->view->rename($relPath . '.tmp', $relPath);
+                               $this->view->rename($relPath . '.part', $relPath);
 
                                $this->view->chroot($fakeRoot);