Skip to content
Snippets Groups Projects
Commit b63e6460 authored by Vincent Petry's avatar Vincent Petry
Browse files

Merge pull request #9460 from owncloud/versions-local

Dont assume local home storage for files_version
parents 404ac8bc 18572b23
No related branches found
No related tags found
No related merge requests found
......@@ -142,15 +142,14 @@ class Storage {
if (!\OC\Files\Filesystem::file_exists($path)) {
$versions_fileview = new \OC\Files\View('/' . $uid . '/files_versions');
$view = new \OC\Files\View('/' . $uid . '/files_versions');
$abs_path = $versions_fileview->getLocalFile($filename . '.v');
$versions = self::getVersions($uid, $filename);
if (!empty($versions)) {
foreach ($versions as $v) {
\OC_Hook::emit('\OCP\Versions', 'preDelete', array('path' => $abs_path . $v['version']));
unlink($abs_path . $v['version']);
\OC_Hook::emit('\OCP\Versions', 'delete', array('path' => $abs_path . $v['version']));
\OC_Hook::emit('\OCP\Versions', 'preDelete', array('path' => $path . $v['version']));
$view->unlink($filename . '.v' . $v['version']);
\OC_Hook::emit('\OCP\Versions', 'delete', array('path' => $path . $v['version']));
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment