From b5401adc00790c33b2618f9f544c20ab747b9f7e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 7 Dec 2016 16:23:13 +0100 Subject: Fix order of parameters when getting notified of smb renames Signed-off-by: Robin Appelman --- apps/files_external/lib/Lib/Storage/SMB.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index 28445dd2f61..85128c56229 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -457,9 +457,11 @@ class SMB extends Common implements INotifyStorage { if (is_null($type)) { return true; } - if ($type === INotifyStorage::NOTIFY_RENAMED && !is_null($oldRenamePath)) { - $result = $callback($type, $path, $oldRenamePath); - $oldRenamePath = null; + if ($type === INotifyStorage::NOTIFY_RENAMED) { + if (!is_null($oldRenamePath)) { + $result = $callback($type, $oldRenamePath, $path); + $oldRenamePath = null; + } } else { $result = $callback($type, $path); } -- cgit v1.2.3