summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-07-04 17:57:43 +0200
committerRobin Appelman <icewind@owncloud.com>2014-07-07 15:49:08 +0200
commit18572b236730e166aa10bb05e0baef8d2f535353 (patch)
treeb440ef4d0cc2ef5b55a4af13fcce30d01ae80c60
parentb271e05bc9066157a7af62062ad2d47e73dd54b7 (diff)
downloadnextcloud-server-18572b236730e166aa10bb05e0baef8d2f535353.tar.gz
nextcloud-server-18572b236730e166aa10bb05e0baef8d2f535353.zip
Dont delete versions as local files
-rw-r--r--apps/files_versions/lib/versions.php9
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']));
}
}
}