diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-07-10 10:28:24 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-07-10 10:28:24 +0200 |
commit | b63e6460531203b8702a6a75a0eb3f6f53c2aeb1 (patch) | |
tree | b30ff5c3f31162322bed5579f51a3ba2c3a30019 | |
parent | 404ac8bcd32aca8f9b004621ac737800cd86dfd1 (diff) | |
parent | 18572b236730e166aa10bb05e0baef8d2f535353 (diff) | |
download | nextcloud-server-b63e6460531203b8702a6a75a0eb3f6f53c2aeb1.tar.gz nextcloud-server-b63e6460531203b8702a6a75a0eb3f6f53c2aeb1.zip |
Merge pull request #9460 from owncloud/versions-local
Dont assume local home storage for files_version
-rw-r--r-- | apps/files_versions/lib/versions.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index 4e6004808d2..5035defd60b 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -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'])); } } } |