mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DATFromDir] Add blanks flag
This commit is contained in:
@@ -25,6 +25,7 @@ namespace SabreTools
|
|||||||
private bool _bare;
|
private bool _bare;
|
||||||
private bool _archivesAsFiles;
|
private bool _archivesAsFiles;
|
||||||
private bool _enableGzip;
|
private bool _enableGzip;
|
||||||
|
private bool _addblanks;
|
||||||
private bool _nowrite;
|
private bool _nowrite;
|
||||||
|
|
||||||
// Other required variables
|
// Other required variables
|
||||||
@@ -60,6 +61,7 @@ namespace SabreTools
|
|||||||
_enableGzip = enableGzip;
|
_enableGzip = enableGzip;
|
||||||
_tempDir = tempDir;
|
_tempDir = tempDir;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
|
_addblanks = false; // This needs a proper flag later
|
||||||
_nowrite = nowrite;
|
_nowrite = nowrite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,8 +165,8 @@ namespace SabreTools
|
|||||||
lastparent = ProcessPossibleArchive(subitem, sw, lastparent);
|
lastparent = ProcessPossibleArchive(subitem, sw, lastparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// In romba mode we ignore empty folders completely
|
// Now find all folders that are empty, if we are supposed to
|
||||||
if (!_datdata.Romba)
|
if (!_datdata.Romba && _addblanks)
|
||||||
{
|
{
|
||||||
// If there were no subitems, add a "blank" game to to the set (if not in Romba mode)
|
// If there were no subitems, add a "blank" game to to the set (if not in Romba mode)
|
||||||
if (!items)
|
if (!items)
|
||||||
@@ -253,8 +255,8 @@ namespace SabreTools
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now output any empties to the stream (if not in Romba mode)
|
// Now find all folders that are empty, if we are supposed to
|
||||||
if (!_datdata.Romba)
|
if (!_datdata.Romba && _addblanks)
|
||||||
{
|
{
|
||||||
List<string> keys = _datdata.Files.Keys.ToList();
|
List<string> keys = _datdata.Files.Keys.ToList();
|
||||||
foreach (string key in keys)
|
foreach (string key in keys)
|
||||||
|
|||||||
Reference in New Issue
Block a user