aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib/crypt.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_encryption/lib/crypt.php')
-rwxr-xr-xapps/files_encryption/lib/crypt.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php
index 231bfd9826b..7f96702b768 100755
--- a/apps/files_encryption/lib/crypt.php
+++ b/apps/files_encryption/lib/crypt.php
@@ -188,10 +188,17 @@ class Crypt {
$trimmed = ltrim( $path, '/' );
+ // Path must not include user/files
+ $split = explode( '/', $trimmed );
+ $sliced = array_slice( $split, 2 );
+ $relPath = implode( '/', $sliced );
+
+// trigger_error("REL PATH = ".var_export($relPath, 1));
+
// trigger_error( "DATA = ".var_export($data, 1). " CATFILE?: ".var_export( self::isCatfile( $data ), 1));
// Fetch all file metadata from DB
- $metadata = \OC\Files\Filesystem::getFileInfo( $trimmed, '' );
+ $metadata = \OC\Files\Filesystem::getFileInfo( $relPath, '' );
trigger_error("PATH = ". var_export($trimmed, 1)." METADATA = ".var_export($metadata['encrypted'], 1));