[Pkg-owncloud-commits] [owncloud] 09/59: Dont delete versions as local files
David Prévot
taffit at moszumanska.debian.org
Fri Jul 18 16:19:24 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit c5278a421a0725672db8c0aec38a4183f7b399b4
Author: Robin Appelman <icewind at owncloud.com>
Date: Fri Jul 4 17:57:43 2014 +0200
Dont delete versions as local files
---
apps/files_versions/lib/versions.php | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index 4e60048..5035def 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']));
}
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list