aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib/util.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_encryption/lib/util.php')
-rw-r--r--apps/files_encryption/lib/util.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index 434ed225644..ef8d0161f6e 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -101,15 +101,24 @@ class Util {
or !$this->view->file_exists($this->publicKeyPath)
or !$this->view->file_exists($this->privateKeyPath)
) {
-
return false;
-
} else {
-
return true;
-
}
+ }
+ /**
+ * @brief check if the users private & public key exists
+ * @return boolean
+ */
+ public function userKeysExists() {
+ if (
+ $this->view->file_exists($this->privateKeyPath) &&
+ $this->view->file_exists($this->publicKeyPath)) {
+ return true;
+ } else {
+ return false;
+ }
}
/**
@@ -761,7 +770,7 @@ class Util {
\OC\Files\Filesystem::putFileInfo($relPath, array(
'encrypted' => false,
'size' => $size,
- 'unencrypted_size' => $size,
+ 'unencrypted_size' => 0,
'etag' => $fileInfo['etag']
));