Skip to content

Commit b1f696d

Browse files
committed
skip empty folders with no py files
1 parent 069f1be commit b1f696d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

MCPForUnity/Editor/Helpers/ServerInstaller.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,13 @@ private static void CopyUnityProjectTools(string destToolsDir)
480480
// Get all .py files (excluding __init__.py)
481481
var pyFiles = Directory.GetFiles(folder, "*.py")
482482
.Where(f => !Path.GetFileName(f).Equals("__init__.py", StringComparison.OrdinalIgnoreCase));
483+
484+
// Skip folders with no .py files
485+
if (!pyFiles.Any())
486+
{
487+
skippedCount++;
488+
continue;
489+
}
483490

484491
foreach (var pyFile in pyFiles)
485492
{

0 commit comments

Comments
 (0)