From: Sam Tuke Date: Tue, 16 Apr 2013 11:25:59 +0000 (-0700) Subject: Merge pull request #2885 from FlorinPeter/files_encryption X-Git-Tag: v6.0.0alpha2~743^2~186 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b4dd6ae36c6242869f95a3a02d57b32f41b86431;p=nextcloud-server.git Merge pull request #2885 from FlorinPeter/files_encryption fix performance issues --- b4dd6ae36c6242869f95a3a02d57b32f41b86431 diff --cc apps/files_encryption/lib/stream.php index 7315245fcce,dcc12c9f9ea..ebfd05041ba --- a/apps/files_encryption/lib/stream.php +++ b/apps/files_encryption/lib/stream.php @@@ -224,9 -224,14 +224,14 @@@ class Stream */ public function getKey() { + // fix performance issues + if(isset($this->keyfile) && isset($this->encKeyfile)) { + return true; + } + // If a keyfile already exists for a file named identically to // file to be written - if ( $this->rootView->file_exists( $this->userId . '/'. 'files_encryption' . '/' . 'keyfiles' . '/' . $this->rawPath . '.key' ) ) { + if ( $this->rootView->file_exists( $this->userId . '/'. 'files_encryption' . '/' . 'keyfiles' . '/' . $this->relPath . '.key' ) ) { // TODO: add error handling for when file exists but no // keyfile