mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DATFromDir, SimpleSort] Better temp folders
This commit is contained in:
@@ -66,7 +66,7 @@ namespace SabreTools
|
||||
_enableGzip = enableGzip;
|
||||
_addBlanks = addBlanks;
|
||||
_addDate = addDate;
|
||||
_tempDir = (String.IsNullOrEmpty(tempDir) ? Path.Combine(Environment.CurrentDirectory, "__tempdir__") : tempDir);
|
||||
_tempDir = (String.IsNullOrEmpty(tempDir) ? Path.Combine(Path.GetTempPath(), "__temp__") : tempDir);
|
||||
_maxDegreeOfParallelism = maxDegreeOfParallelism;
|
||||
_logger = logger;
|
||||
}
|
||||
@@ -199,7 +199,7 @@ namespace SabreTools
|
||||
private void ProcessPossibleArchive(string item)
|
||||
{
|
||||
// Define the temporary directory
|
||||
string tempSubDir = Path.GetFullPath(Path.Combine(_tempDir, Path.GetFileNameWithoutExtension(item))) + Path.DirectorySeparatorChar;
|
||||
string tempSubDir = Path.GetFullPath(Path.Combine(_tempDir, Path.GetRandomFileName())) + Path.DirectorySeparatorChar;
|
||||
|
||||
// Special case for if we are in Romba mode (all names are supposed to be SHA-1 hashes)
|
||||
if (_datdata.Romba)
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace SabreTools.Helper
|
||||
_datdata = datdata;
|
||||
_inputs = inputs;
|
||||
_outdir = (outdir == "" ? "Rebuild" : outdir);
|
||||
_tempdir = (tempdir == "" ? "__temp__" : tempdir);
|
||||
_tempdir = (tempdir == "" ? Path.Combine(Path.GetTempPath(), "__temp__") : tempdir);
|
||||
_quickScan = quickScan;
|
||||
_toFolder = toFolder;
|
||||
_verify = verify;
|
||||
@@ -135,7 +135,7 @@ namespace SabreTools.Helper
|
||||
foreach (string input in _inputs)
|
||||
{
|
||||
DATFromDir dfd = new DATFromDir(input, _datdata, false /* noMD5 */, false /* noSHA1 */, true /* bare */, false /* archivesAsFiles */,
|
||||
true /* enableGzip */, false /* addBlanks */, false /* addDate */, "__temp__" /* tempdir */, 4 /* maxDegreeOfParallelism */, _logger);
|
||||
true /* enableGzip */, false /* addBlanks */, false /* addDate */, "" /* tempdir */, 4 /* maxDegreeOfParallelism */, _logger);
|
||||
dfd.Start();
|
||||
_datdata = dfd.DatData;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user