\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();
}
$fileInfo['unencrypted_size'] = $this->unencryptedSize;
// set fileinfo
- \OC\Files\Filesystem::putFileInfo( $this->rawPath, $fileInfo);
+ $view->putFileInfo( $this->rawPath, $fileInfo);
}
return fclose( $this->handle );
*/
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 ) ) {
} else {
- $info = \OC\Files\Filesystem::getFileInfo( $path );
+ $info = $view->getFileInfo( $path );
$ownerView = new \OC\Files\View( '/' . $fileOwnerUid . '/files' );
// Fetch real file path from DB
}
// 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 ) ) {