mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DATFromDir] Romba ignores all empty folders
This commit is contained in:
@@ -305,7 +305,10 @@ namespace SabreTools
|
|||||||
lastparent = ProcessFile(subitem, sw, lastparent);
|
lastparent = ProcessFile(subitem, sw, lastparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there were no subitems, add a "blank" game to to the set
|
// In romba mode we ignore empty folders completely
|
||||||
|
if (!_datdata.Romba)
|
||||||
|
{
|
||||||
|
// If there were no subitems, add a "blank" game to to the set (if not in Romba mode)
|
||||||
if (!items)
|
if (!items)
|
||||||
{
|
{
|
||||||
string actualroot = item.Remove(0, basePathBackup.Length);
|
string actualroot = item.Remove(0, basePathBackup.Length);
|
||||||
@@ -336,7 +339,7 @@ namespace SabreTools
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now scour subdirectories for empties and add those as well
|
// Now scour subdirectories for empties and add those as well (if not in Romba mode)
|
||||||
foreach (string subdir in Directory.EnumerateDirectories(item, "*", SearchOption.AllDirectories))
|
foreach (string subdir in Directory.EnumerateDirectories(item, "*", SearchOption.AllDirectories))
|
||||||
{
|
{
|
||||||
if (Directory.EnumerateFiles(subdir, "*", SearchOption.AllDirectories).Count() == 0)
|
if (Directory.EnumerateFiles(subdir, "*", SearchOption.AllDirectories).Count() == 0)
|
||||||
@@ -370,6 +373,7 @@ namespace SabreTools
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
_basePath = basePathBackup;
|
_basePath = basePathBackup;
|
||||||
}
|
}
|
||||||
// If this somehow skips past the original sensors
|
// If this somehow skips past the original sensors
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ namespace SabreTools.Helper
|
|||||||
rom.Name = gc[i].Replace("\"", "");
|
rom.Name = gc[i].Replace("\"", "");
|
||||||
break;
|
break;
|
||||||
case "size":
|
case "size":
|
||||||
|
|
||||||
Int64.TryParse(gc[i].Replace("\"", ""), out rom.Size);
|
Int64.TryParse(gc[i].Replace("\"", ""), out rom.Size);
|
||||||
break;
|
break;
|
||||||
case "crc":
|
case "crc":
|
||||||
|
|||||||
Reference in New Issue
Block a user