get the correct paths and owner to access shared files

This commit is contained in:
Björn Schießle 2013-03-26 12:40:31 +01:00
parent a65d741a3f
commit 5f233ee814
1 changed files with 3 additions and 4 deletions

View File

@ -227,11 +227,10 @@ class Proxy extends \OC_FileProxy {
$privateKey = $session->getPrivateKey( $userId );
// Get the file owner so we can retrieve its keyfile
$fileOwner = \OC\Files\Filesystem::getOwner( $relPath ); //NOTE: This might be false! make sure the path passed to it is right
$fileOwner = 'admin'; // FIXME: Manually set the correct UID for now
list($fileOwner, $ownerPath) = $util->getUidAndFilename($relPath);
// Get the encrypted keyfile
$encKeyfile = Keymanager::getFileKey( $view, $fileOwner, $relPath );
$encKeyfile = Keymanager::getFileKey( $view, $fileOwner, $ownerPath );
// Attempt to fetch the user's shareKey
$shareKey = Keymanager::getShareKey( $view, $userId, $relPath );