Merge pull request #2550 from nextcloud/smb-notify-rename

Fix order of parameters when getting notified of smb renames
This commit is contained in:
Lukas Reschke 2016-12-16 16:11:39 +01:00 committed by GitHub
commit 00b4dedef5

View file

@ -499,9 +499,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);
if ($type === INotifyStorage::NOTIFY_RENAMED) {
if (!is_null($oldRenamePath)) {
$result = $callback($type, $oldRenamePath, $path);
$oldRenamePath = null;
}
} else {
$result = $callback($type, $path);
}