Use getPath instead of shareInfo

This commit is contained in:
Victor Dubiniuk 2014-07-04 18:22:07 +03:00
parent 5f6e8d0190
commit 4da91f6d38

View File

@ -157,7 +157,6 @@ class File {
throw new \Exception($this->fileId . ' is a broken share'); throw new \Exception($this->fileId . ' is a broken share');
} }
$view = new View('/' . $owner . '/files'); $view = new View('/' . $owner . '/files');
$path = $rootLinkItem['file_target'];
} else { } else {
$owner = \OCP\User::getUser(); $owner = \OCP\User::getUser();
$root = '/' . $owner; $root = '/' . $owner;
@ -165,9 +164,9 @@ class File {
$root .= '/' . 'files'; $root .= '/' . 'files';
} }
$view = new View($root); $view = new View($root);
$path = $view->getPath($this->fileId);
} }
$path = $view->getPath($this->fileId);
if (!$path){ if (!$path){
throw new \Exception($this->fileId . ' can not be resolved'); throw new \Exception($this->fileId . ' can not be resolved');
} }