Skip to content

Commit fac3b95

Browse files
committed
Rabbbit: Cleanup may delete server’s built-in tool subfolders — restrict to managed names.
1 parent 88a6491 commit fac3b95

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

MCPForUnity/Editor/Helpers/ServerInstaller.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,10 @@ private static void CleanupStaleToolFolders(string destToolsDir, HashSet<string>
557557
if (subdirName.Equals(skip, StringComparison.OrdinalIgnoreCase))
558558
goto NextSubdir;
559559
}
560+
561+
// Only manage per-folder tool installs created by this feature
562+
+ if (!subdirName.EndsWith("_MCPForUnityTools", StringComparison.OrdinalIgnoreCase))
563+
+ goto NextSubdir;
560564

561565
// Check if this subdirectory corresponds to an active tools folder
562566
if (!activeFolderIdentifiers.Contains(subdirName))

0 commit comments

Comments
 (0)