-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure all temp files created in subfolder of %TEMP%
Fixes #492.
- Loading branch information
1 parent
e25d796
commit 8471eb4
Showing
5 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See the LICENSE.md file in the project root for more information. | ||
|
||
using Microsoft.IO; | ||
|
||
namespace Microsoft.VisualStudio.ProjectSystem.Tools; | ||
|
||
internal static class PathUtil | ||
{ | ||
public static string GetTempFileName(string fileName) | ||
{ | ||
string tempPath = Path.Combine(Path.GetTempPath(), "project-system-tools"); | ||
|
||
// Ensure our directory exists | ||
Directory.CreateDirectory(tempPath); | ||
|
||
return Path.Combine(tempPath, fileName); | ||
} | ||
} |