Skip to content

Commit

Permalink
Fix deletion of non nuget-packages (#511)
Browse files Browse the repository at this point in the history
Only delete unnecessary directories that contain a NuGet Package
  • Loading branch information
JoC0de authored Apr 12, 2023
1 parent 2a728b4 commit c2477b9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/NuGetForUnity/Editor/NugetHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,13 @@ internal static void CheckForUnnecessaryPackages()
continue;
}

var pkgPath = Path.Combine(folder, $"{folderName}.nupkg");
var pkgPath = Path.Combine(folder, $"{folderName}.nupkg");
if (!File.Exists(pkgPath))
{
// ignore folder not containing a nuget-package
continue;
}

var package = NugetPackage.FromNupkgFile(pkgPath);

var installed = false;
Expand Down

0 comments on commit c2477b9

Please sign in to comment.