Skip to content

Commit 70b6ae6

Browse files
committed
Add comments to nuget.config file restore
1 parent 5be3993 commit 70b6ae6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/NugetPackages.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ public void Dispose()
267267
using (var backup = File.OpenRead(backupNugetConfig))
268268
using (var current = File.OpenWrite(nugetConfigPath))
269269
{
270-
current.SetLength(0);
271-
backup.CopyTo(current);
270+
current.SetLength(0); // Truncate file
271+
backup.CopyTo(current); // Restore original content
272272
}
273273

274274
logger.LogInfo("Deleting backup nuget.config file");

0 commit comments

Comments
 (0)