aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Peter <github@florin-peter.de>2013-05-07 13:42:49 +0200
committerFlorin Peter <github@florin-peter.de>2013-05-07 13:42:49 +0200
commit8b545538722179ea7e68c4765fa9722adc77d546 (patch)
tree6a486dfbcf6799c2bc2b8cadebe469435a17cdd9
parenta9649713d31f9524355680515ed9fe080eba6d63 (diff)
downloadnextcloud-server-8b545538722179ea7e68c4765fa9722adc77d546.tar.gz
nextcloud-server-8b545538722179ea7e68c4765fa9722adc77d546.zip
fix for wrong file infos
-rw-r--r--apps/files_encryption/lib/stream.php4
-rw-r--r--apps/files_encryption/lib/util.php7
2 files changed, 6 insertions, 5 deletions
diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php
index eb1cb45871c..c2b13b00b24 100644
--- a/apps/files_encryption/lib/stream.php
+++ b/apps/files_encryption/lib/stream.php
@@ -513,7 +513,7 @@ class Stream {
\OC_FileProxy::$enabled = $proxyStatus;
// get file info
- $fileInfo = \OC\Files\Filesystem::getFileInfo($this->rawPath);
+ $fileInfo = $view->getFileInfo($this->rawPath);
if(!is_array($fileInfo)) {
$fileInfo = array();
}
@@ -524,7 +524,7 @@ class Stream {
$fileInfo['unencrypted_size'] = $this->unencryptedSize;
// set fileinfo
- \OC\Files\Filesystem::putFileInfo( $this->rawPath, $fileInfo);
+ $view->putFileInfo( $this->rawPath, $fileInfo);
}
return fclose( $this->handle );
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index 2e8e2af683b..5ab5ea6425f 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -1040,7 +1040,8 @@ class Util {
*/
public function getUidAndFilename( $path ) {
- $fileOwnerUid = \OC\Files\Filesystem::getOwner( $path );
+ $view = new \OC\Files\View($this->userFilesDir);
+ $fileOwnerUid = $view->getOwner( $path );
// Check that UID is valid
if ( ! \OCP\User::userExists( $fileOwnerUid ) ) {
@@ -1060,7 +1061,7 @@ class Util {
} else {
- $info = \OC\Files\Filesystem::getFileInfo( $path );
+ $info = $view->getFileInfo( $path );
$ownerView = new \OC\Files\View( '/' . $fileOwnerUid . '/files' );
// Fetch real file path from DB
@@ -1069,7 +1070,7 @@ class Util {
}
// Make path relative for use by $view
- $relpath = $fileOwnerUid . '/' . $this->fileFolderName . '/' . $filename;
+ $relpath = \OC\Files\Filesystem::normalizePath($fileOwnerUid . '/' . $this->fileFolderName . '/' . $filename);
// Check that the filename we're using is working
if ( $this->view->file_exists( $relpath ) ) {