From d7528a9b9f9be253a869fec28d76ade2f9c02d88 Mon Sep 17 00:00:00 2001 From: Florin Peter Date: Thu, 13 Jun 2013 20:52:34 +0200 Subject: [PATCH] fix for path_hash not unique as reported at #3641 --- apps/files_encryption/lib/util.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index a6fd2e8b377..f62ec359306 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -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); -- 2.39.5