aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib/proxy.php
diff options
context:
space:
mode:
authorFlorin Peter <github@florin-peter.de>2013-05-22 00:55:16 +0200
committerFlorin Peter <github@florin-peter.de>2013-05-22 01:11:55 +0200
commitafbfa742d7848089523262f5c234035db1b20d3b (patch)
tree5856a08428df91068cfcd2f3f7600718880eef3e /apps/files_encryption/lib/proxy.php
parent9ca9a22c6a6495e657290195c97282aee8976282 (diff)
downloadnextcloud-server-afbfa742d7848089523262f5c234035db1b20d3b.tar.gz
nextcloud-server-afbfa742d7848089523262f5c234035db1b20d3b.zip
improved tests
Diffstat (limited to 'apps/files_encryption/lib/proxy.php')
-rw-r--r--apps/files_encryption/lib/proxy.php55
1 files changed, 0 insertions, 55 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index f29e893f12a..cc9d239b256 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -361,24 +361,6 @@ class Proxy extends \OC_FileProxy
/**
* @param $path
- * @param $mime
- * @return string
- */
- public function postGetMimeType($path, $mime)
- {
-
- if (Crypt::isCatfileContent($path)) {
-
- $mime = \OCP\Files::getMimeType('crypt://' . $path, 'w');
-
- }
-
- return $mime;
-
- }
-
- /**
- * @param $path
* @param $data
* @return array
*/
@@ -404,43 +386,6 @@ class Proxy extends \OC_FileProxy
/**
* @param $path
- * @param $data
- * @return mixed
- */
- public function postStat($path, $data)
- {
- $content = '';
- $view = new \OC_FilesystemView('/');
- if($view->file_exists($path)) {
- // disable encryption proxy
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // we only need 24 byte from the last chunk
- $handle = $view->fopen($path, 'r');
- if (!fseek($handle, -24, SEEK_END)) {
- $content = fgets($handle);
- }
-
- // re-enable proxy
- \OC_FileProxy::$enabled = $proxyStatus;
- }
-
- // check if file is encrypted
- if (Crypt::isCatfileContent($content)) {
-
- // get file info from cache
- $cached = $view->getFileInfo($path);
-
- // set the real file size
- $data['size'] = $cached['unencrypted_size'];
- }
-
- return $data;
- }
-
- /**
- * @param $path
* @param $size
* @return bool
*/