[Pkg-owncloud-commits] [owncloud] 415/457: ensure we dont have to scan a file in the trash wrapper
David Prévot
taffit at moszumanska.debian.org
Sun Jun 28 20:06:58 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit 5efbab4ab8b844051ad289dc0f8cb6f48604c971
Author: Robin Appelman <icewind at owncloud.com>
Date: Tue Jun 9 17:01:31 2015 +0200
ensure we dont have to scan a file in the trash wrapper
---
apps/files_trashbin/lib/trashbin.php | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index 853bc1e..3a221bc 100644
--- a/apps/files_trashbin/lib/trashbin.php
+++ b/apps/files_trashbin/lib/trashbin.php
@@ -55,6 +55,15 @@ class Trashbin {
*/
private static $scannedVersions = false;
+ /**
+ * Ensure we dont need to scan the file during the move to trash
+ *
+ * @param array $params
+ */
+ public static function ensureFileScannedHook($params) {
+ self::getUidAndFilename($params['path']);
+ }
+
public static function getUidAndFilename($filename) {
$uid = \OC\Files\Filesystem::getOwner($filename);
\OC\Files\Filesystem::initMountPoints($uid);
@@ -870,6 +879,7 @@ class Trashbin {
//Listen to post write hook
\OCP\Util::connectHook('OC_Filesystem', 'post_write', 'OCA\Files_Trashbin\Hooks', 'post_write_hook');
// pre and post-rename, disable trash logic for the copy+unlink case
+ \OCP\Util::connectHook('OC_Filesystem', 'delete', 'OCA\Files_Trashbin\Trashbin', 'ensureFileScannedHook');
\OCP\Util::connectHook('OC_Filesystem', 'rename', 'OCA\Files_Trashbin\Storage', 'preRenameHook');
\OCP\Util::connectHook('OC_Filesystem', 'post_rename', 'OCA\Files_Trashbin\Storage', 'postRenameHook');
}
--
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