aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib/storage.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-03-26 22:01:05 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-03-26 22:01:05 +0100
commite8109f0bc3065cb038bc97faa37d0a19e748fdd9 (patch)
tree7a77c9022000d8e761dd1045afbf60bc37afb18b /apps/files_trashbin/lib/storage.php
parent4c00be49613fe14a03e996dd0768bcb7ef2795ab (diff)
parenteef5851a6750da9fb15446af09dd8f385131de73 (diff)
downloadnextcloud-server-e8109f0bc3065cb038bc97faa37d0a19e748fdd9.tar.gz
nextcloud-server-e8109f0bc3065cb038bc97faa37d0a19e748fdd9.zip
Merge pull request #13802 from owncloud/share-partfilepermissions
Fix share permission checks
Diffstat (limited to 'apps/files_trashbin/lib/storage.php')
-rw-r--r--apps/files_trashbin/lib/storage.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/files_trashbin/lib/storage.php b/apps/files_trashbin/lib/storage.php
index 72788aa5ba8..3f474d71da5 100644
--- a/apps/files_trashbin/lib/storage.php
+++ b/apps/files_trashbin/lib/storage.php
@@ -63,6 +63,22 @@ class Storage extends Wrapper {
}
/**
+ * Rename path1 to path2 by calling the wrapped storage.
+ *
+ * @param string $path1 first path
+ * @param string $path2 second path
+ */
+ public function rename($path1, $path2) {
+ $result = $this->storage->rename($path1, $path2);
+ if ($result === false) {
+ // when rename failed, the post_rename hook isn't triggered,
+ // but we still want to reenable the trash logic
+ self::$disableTrash = false;
+ }
+ return $result;
+ }
+
+ /**
* Deletes the given file by moving it into the trashbin.
*
* @param string $path