Selaa lähdekoodia

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

Fix order of parameters when getting notified of smb renames
Lukas Reschke 8 vuotta sitten
vanhempi
commit
00b4dedef5
1 muutettua tiedostoa jossa 5 lisäystä ja 3 poistoa
  1. 5 3
      apps/files_external/lib/Lib/Storage/SMB.php

+ 5 - 3
apps/files_external/lib/Lib/Storage/SMB.php

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