Fix order of parameters when getting notified of smb renames

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2016-12-07 16:23:13 +01:00
parent b1901534be
commit b5401adc00
No known key found for this signature in database
GPG Key ID: 425003AC385454C5

View File

@ -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);
}