Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Commit

Permalink
Use Path.GetDirectoryName to find package's parent directory
Browse files Browse the repository at this point in the history
Fixes #1214
  • Loading branch information
pranavkm committed Feb 14, 2015
1 parent 624e635 commit 9d1b59b
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -38,7 +38,7 @@ internal static class NuGetPackageUtils
// extracted, the Restore Operation can inadvertly conclude the package is available locally and proceed to read
// partially written package contents. To avoid this we'll extract the package to a sibling directory and Move it
// to the target path.
var extractPath = Path.Combine(targetPath, "..", Path.GetRandomFileName());
var extractPath = Path.Combine(Path.GetDirectoryName(targetPath), Path.GetRandomFileName());
Directory.CreateDirectory(extractPath);
targetNupkg = Path.Combine(extractPath, Path.GetFileName(targetNupkg));
using (var nupkgStream = new FileStream(targetNupkg, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite | FileShare.Delete))
Expand Down

0 comments on commit 9d1b59b

Please sign in to comment.