[SevenZipArchive, XZArchive, Utilities] Cleanup including temp path

This commit is contained in:
Matt Nadareski
2017-12-05 15:08:46 -08:00
parent f1d1b2e9e5
commit af0ab5a10e
3 changed files with 4 additions and 5 deletions

View File

@@ -396,7 +396,7 @@ namespace SabreTools.Library.FileTypes
}; };
// Create the temp directory // Create the temp directory
string tempPath = Path.Combine(Path.GetTempPath(), new Guid().ToString()); string tempPath = Path.Combine(outDir, new Guid().ToString());
if (!Directory.Exists(tempPath)) if (!Directory.Exists(tempPath))
{ {
Directory.CreateDirectory(tempPath); Directory.CreateDirectory(tempPath);
@@ -609,7 +609,7 @@ namespace SabreTools.Library.FileTypes
keys.Sort(ZipFile.TorrentZipStringCompare); keys.Sort(ZipFile.TorrentZipStringCompare);
// Create the temp directory // Create the temp directory
string tempPath = Path.Combine(Path.GetTempPath(), new Guid().ToString()); string tempPath = Path.Combine(outDir, new Guid().ToString());
if (!Directory.Exists(tempPath)) if (!Directory.Exists(tempPath))
{ {
Directory.CreateDirectory(tempPath); Directory.CreateDirectory(tempPath);

View File

@@ -194,7 +194,7 @@ namespace SabreTools.Library.FileTypes
}; };
// Create the temp directory // Create the temp directory
string tempPath = Path.Combine(Path.GetTempPath(), new Guid().ToString()); string tempPath = Path.Combine(outDir, new Guid().ToString());
if (!Directory.Exists(tempPath)) if (!Directory.Exists(tempPath))
{ {
Directory.CreateDirectory(tempPath); Directory.CreateDirectory(tempPath);
@@ -407,7 +407,7 @@ namespace SabreTools.Library.FileTypes
keys.Sort(ZipFile.TorrentZipStringCompare); keys.Sort(ZipFile.TorrentZipStringCompare);
// Create the temp directory // Create the temp directory
string tempPath = Path.Combine(Path.GetTempPath(), new Guid().ToString()); string tempPath = Path.Combine(outDir, new Guid().ToString());
if (!Directory.Exists(tempPath)) if (!Directory.Exists(tempPath))
{ {
Directory.CreateDirectory(tempPath); Directory.CreateDirectory(tempPath);

View File

@@ -974,7 +974,6 @@ namespace SabreTools.Library.Tools
/// </summary> /// </summary>
/// <param name="filename">Name of the file to be parsed</param> /// <param name="filename">Name of the file to be parsed</param>
/// <returns>The DatFormat corresponding to the DAT</returns> /// <returns>The DatFormat corresponding to the DAT</returns>
/// <remarks>There is currently no differentiation between XML and SabreDAT here</remarks>
public static DatFormat GetDatFormat(string filename) public static DatFormat GetDatFormat(string filename)
{ {
// Limit the output formats based on extension // Limit the output formats based on extension