Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
anamnavi committed Dec 19, 2024
1 parent 0429c43 commit ac8d77a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/code/PublishHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1348,20 +1348,15 @@ internal Hashtable GetMetadataFromNupkg(string copiedNupkgPath, string packageNa
errRecord = null;

// in temp directory create an "extract" folder to which we'll copy .nupkg to, extract contents, etc.
string nupkgDirPath = Directory.GetParent(copiedNupkgPath).FullName; //someGuid/nupkg.myPkg.nupkg -> /someGuid/nupkg
string nupkgDirPath = Directory.GetParent(copiedNupkgPath).FullName; //someGuid/nupkg/myPkg.nupkg -> /someGuid/nupkg
string tempPath = Directory.GetParent(nupkgDirPath).FullName; // someGuid
var extractPath = System.IO.Path.Combine(tempPath, "extract");
string packageFullName = System.IO.Path.GetFileName(copiedNupkgPath);
var extractPath = System.IO.Path.Combine(tempPath, "extract"); // someGuid/extract

try
{
var dir = Directory.CreateDirectory(extractPath);
dir.Attributes &= ~FileAttributes.ReadOnly;

// copy .nupkg
// string destNupkgPath = Path.Combine(tempDiscoveryPath, packageFullName);
// File.Copy(packagePath, destNupkgPath);

// change extension to .zip
string zipFilePath = System.IO.Path.ChangeExtension(copiedNupkgPath, ".zip");
File.Move(copiedNupkgPath, zipFilePath);
Expand Down

0 comments on commit ac8d77a

Please sign in to comment.