diff options
author | Florin Peter <github@florin-peter.de> | 2013-05-16 00:31:17 +0200 |
---|---|---|
committer | Florin Peter <github@florin-peter.de> | 2013-05-16 00:31:17 +0200 |
commit | c0c4fe5fd3cd575656ed30b4464bb6bc3c6d4f40 (patch) | |
tree | 24af1f8f65398f45c2792b716d529901249dcc8f /apps | |
parent | 8f963b95e53e54220bcce1931599496d9aa797b1 (diff) | |
download | nextcloud-server-c0c4fe5fd3cd575656ed30b4464bb6bc3c6d4f40.tar.gz nextcloud-server-c0c4fe5fd3cd575656ed30b4464bb6bc3c6d4f40.zip |
fix if file is not yet created
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_encryption/lib/proxy.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 36d05d7e0fe..1d60770b4d7 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -131,8 +131,13 @@ class Proxy extends \OC_FileProxy { $encData = Crypt::symmetricEncryptFileContent( $data, $plainKey ); $sharingEnabled = \OCP\Share::isEnabled(); - - $uniqueUserIds = $util->getSharingUsersArray( $sharingEnabled, $filePath, $userId ); + + // if file exists try to get sharing users + if($view->file_exists($path)) { + $uniqueUserIds = $util->getSharingUsersArray( $sharingEnabled, $filePath, $userId ); + } else { + $uniqueUserIds[] = $userId; + } // Fetch public keys for all users who will share the file $publicKeys = Keymanager::getPublicKeys( $view, $uniqueUserIds ); |