summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-09-30 15:08:53 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2013-09-30 15:08:53 +0200
commit4d79e7e6733d06da6f4d7f0c44ef95a2a96c4aae (patch)
tree5556fd4f3d9c638bb11cdad4c1aed31e09b9263d /apps/files_encryption
parent54965ce065ba7447cee2f4f60fe1babcc7371214 (diff)
parent480aeb804fc64be6fdcb1551f89e21304e270b33 (diff)
downloadnextcloud-server-4d79e7e6733d06da6f4d7f0c44ef95a2a96c4aae.tar.gz
nextcloud-server-4d79e7e6733d06da6f4d7f0c44ef95a2a96c4aae.zip
Merge branch 'master' into encryption_improved_error_messages_4617
Diffstat (limited to 'apps/files_encryption')
-rw-r--r--apps/files_encryption/l10n/uk.php1
-rwxr-xr-xapps/files_encryption/lib/keymanager.php5
-rw-r--r--apps/files_encryption/lib/proxy.php7
3 files changed, 8 insertions, 5 deletions
diff --git a/apps/files_encryption/l10n/uk.php b/apps/files_encryption/l10n/uk.php
index e4fb053a71a..5260dd3f2f7 100644
--- a/apps/files_encryption/l10n/uk.php
+++ b/apps/files_encryption/l10n/uk.php
@@ -1,6 +1,7 @@
<?php
$TRANSLATIONS = array(
"Saving..." => "Зберігаю...",
+"personal settings" => "особисті налаштування",
"Encryption" => "Шифрування",
"Change Password" => "Змінити Пароль"
);
diff --git a/apps/files_encryption/lib/keymanager.php b/apps/files_encryption/lib/keymanager.php
index 9be3dda7ce3..7143fcff0f6 100755
--- a/apps/files_encryption/lib/keymanager.php
+++ b/apps/files_encryption/lib/keymanager.php
@@ -40,11 +40,14 @@ class Keymanager {
public static function getPrivateKey(\OC_FilesystemView $view, $user) {
$path = '/' . $user . '/' . 'files_encryption' . '/' . $user . '.private.key';
+ $key = false;
$proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false;
- $key = $view->file_get_contents($path);
+ if ($view->file_exists($path)) {
+ $key = $view->file_get_contents($path);
+ }
\OC_FileProxy::$enabled = $proxyStatus;
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index eb7ba60cb9d..4ec810a5199 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -50,9 +50,8 @@ class Proxy extends \OC_FileProxy {
private static function shouldEncrypt($path) {
if (is_null(self::$enableEncryption)) {
-
if (
- \OCP\Config::getAppValue('files_encryption', 'enable_encryption', 'true') === 'true'
+ \OCP\App::isEnabled('files_encryption') === true
&& Crypt::mode() === 'server'
) {
@@ -200,7 +199,7 @@ class Proxy extends \OC_FileProxy {
*/
public function preUnlink($path) {
- // let the trashbin handle this
+ // let the trashbin handle this
if (\OCP\App::isEnabled('files_trashbin')) {
return true;
}
@@ -291,7 +290,7 @@ class Proxy extends \OC_FileProxy {
// Close the original encrypted file
fclose($result);
- // Open the file using the crypto stream wrapper
+ // Open the file using the crypto stream wrapper
// protocol and let it do the decryption work instead
$result = fopen('crypt://' . $path, $meta['mode']);