mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile] Re-add single-file DAT creation for DFD
This commit is contained in:
@@ -5188,7 +5188,9 @@ namespace SabreTools.Helper.Dats
|
|||||||
Description = Name + (bare ? "" : " (" + Date + ")");
|
Description = Name + (bare ? "" : " (" + Date + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process the input folder
|
// Process the input
|
||||||
|
if (Directory.Exists(basePath))
|
||||||
|
{
|
||||||
logger.Verbose("Folder found: " + basePath);
|
logger.Verbose("Folder found: " + basePath);
|
||||||
|
|
||||||
// Process the files in all subfolders
|
// Process the files in all subfolders
|
||||||
@@ -5255,6 +5257,12 @@ namespace SabreTools.Helper.Dats
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (File.Exists(basePath))
|
||||||
|
{
|
||||||
|
DFDProcessPossibleArchive(basePath, basePath, noMD5, noSHA1, bare, archivesAsFiles, enableGzip, addBlanks, addDate,
|
||||||
|
tempDir, copyFiles, headerToCheckAgainst, maxDegreeOfParallelism, logger);
|
||||||
|
}
|
||||||
|
|
||||||
// Now that we're done, delete the temp folder (if it's not the default)
|
// Now that we're done, delete the temp folder (if it's not the default)
|
||||||
logger.User("Cleaning temp folder");
|
logger.User("Cleaning temp folder");
|
||||||
@@ -5545,8 +5553,19 @@ namespace SabreTools.Helper.Dats
|
|||||||
|
|
||||||
// Update rom information
|
// Update rom information
|
||||||
datItem.Name = romname;
|
datItem.Name = romname;
|
||||||
|
if (datItem.Machine == null)
|
||||||
|
{
|
||||||
|
datItem.Machine = new Machine
|
||||||
|
{
|
||||||
|
Name = gamename,
|
||||||
|
Description = gamename,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
datItem.Machine.Name = gamename;
|
datItem.Machine.Name = gamename;
|
||||||
datItem.Machine.Description = gamename;
|
datItem.Machine.Description = gamename;
|
||||||
|
}
|
||||||
|
|
||||||
// Add the file information to the DAT
|
// Add the file information to the DAT
|
||||||
lock (Files)
|
lock (Files)
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ namespace SabreTools
|
|||||||
// For each input directory, create a DAT
|
// For each input directory, create a DAT
|
||||||
foreach (string path in inputs)
|
foreach (string path in inputs)
|
||||||
{
|
{
|
||||||
if (Directory.Exists(path))
|
if (Directory.Exists(path) || File.Exists(path))
|
||||||
{
|
{
|
||||||
// Clone the base Dat for information
|
// Clone the base Dat for information
|
||||||
DatFile datdata = (DatFile)basedat.Clone();
|
DatFile datdata = (DatFile)basedat.Clone();
|
||||||
|
|||||||
Reference in New Issue
Block a user