Skip to content

Commit c2477b9

Browse files
authored
Fix deletion of non nuget-packages (#511)
Only delete unnecessary directories that contain a NuGet Package
1 parent 2a728b4 commit c2477b9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/NuGetForUnity/Editor/NugetHelper.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,13 @@ internal static void CheckForUnnecessaryPackages()
14301430
continue;
14311431
}
14321432

1433-
var pkgPath = Path.Combine(folder, $"{folderName}.nupkg");
1433+
var pkgPath = Path.Combine(folder, $"{folderName}.nupkg");
1434+
if (!File.Exists(pkgPath))
1435+
{
1436+
// ignore folder not containing a nuget-package
1437+
continue;
1438+
}
1439+
14341440
var package = NugetPackage.FromNupkgFile(pkgPath);
14351441

14361442
var installed = false;

0 commit comments

Comments
 (0)