diff options
author | Sam Tuke <samtuke@owncloud.com> | 2013-02-05 15:35:29 +0000 |
---|---|---|
committer | Sam Tuke <samtuke@owncloud.com> | 2013-02-05 15:35:29 +0000 |
commit | 53248a9b6069f64662e259053684c175498fe67d (patch) | |
tree | 5a33829814098b57a4e0753d038332f9c8675595 /apps/files_encryption/lib/crypt.php | |
parent | fd90b82acd5c553c28998e9a66d6d914c1fb987b (diff) | |
download | nextcloud-server-53248a9b6069f64662e259053684c175498fe67d.tar.gz nextcloud-server-53248a9b6069f64662e259053684c175498fe67d.zip |
Recryption of legacy encrypted files now working on login
Diffstat (limited to 'apps/files_encryption/lib/crypt.php')
-rwxr-xr-x | apps/files_encryption/lib/crypt.php | 9 |
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));
|