mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ALL] Mappings and pathing updates
This commit is contained in:
@@ -332,8 +332,9 @@ namespace SabreTools
|
||||
foreach (string entry in Directory.EnumerateFiles(tempdir, "*", SearchOption.AllDirectories))
|
||||
{
|
||||
lastparent = ProcessFile(Path.GetFullPath(entry), sw, Path.GetFullPath(tempdir),
|
||||
(Path.GetDirectoryName(Path.GetFullPath(item)) + Path.DirectorySeparatorChar).Remove(0, _basePath.Length) +
|
||||
Path.DirectorySeparatorChar + Path.GetFileNameWithoutExtension(item), _datdata, lastparent);
|
||||
Path.Combine((Path.GetDirectoryName(Path.GetFullPath(item)) + Path.DirectorySeparatorChar).Remove(0, _basePath.Length) +
|
||||
Path.GetFileNameWithoutExtension(item)
|
||||
), _datdata, lastparent);
|
||||
}
|
||||
|
||||
// Clear the temp directory
|
||||
|
||||
@@ -85,8 +85,8 @@ namespace SabreTools
|
||||
return false;
|
||||
}
|
||||
|
||||
path += Path.DirectorySeparatorChar + system.Trim();
|
||||
name = system.Trim();
|
||||
path = Path.Combine(path, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace SabreTools
|
||||
_logger.User("Processing DATs for system: '" + kv.Key + "'");
|
||||
|
||||
// Set the folder to iterate through based on the DAT root
|
||||
string folder = _datroot + Path.DirectorySeparatorChar + kv.Key.Trim();
|
||||
string folder = Path.Combine(_datroot, kv.Key.Trim());
|
||||
|
||||
// Audit all files in the folder
|
||||
foreach (string file in Directory.EnumerateFiles(folder, "*", SearchOption.AllDirectories))
|
||||
|
||||
@@ -482,8 +482,7 @@ namespace SabreTools
|
||||
|
||||
rootpath += (rootpath == "" ? "" : Path.DirectorySeparatorChar.ToString());
|
||||
filename = filename.Remove(0, rootpath.Length);
|
||||
newrom.Game = Path.GetDirectoryName(filename) + Path.DirectorySeparatorChar.ToString() +
|
||||
Path.GetFileNameWithoutExtension(filename) + Path.DirectorySeparatorChar + newrom.Game;
|
||||
newrom.Game = Path.Combine(Path.GetDirectoryName(filename), Path.GetFileNameWithoutExtension(filename), newrom.Game);
|
||||
newroms.Add(newrom);
|
||||
}
|
||||
userData.Roms[key] = newroms;
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace SabreTools
|
||||
/// </summary>
|
||||
private static void Setup()
|
||||
{
|
||||
Remapping.CreateRemappings();
|
||||
Build.Start("DATabase");
|
||||
|
||||
// Perform initial database and folder setup
|
||||
@@ -40,7 +39,7 @@ namespace SabreTools
|
||||
while (sldr.Read())
|
||||
{
|
||||
int systemid = sldr.GetInt32(0);
|
||||
string system = _datroot + Path.DirectorySeparatorChar + sldr.GetString(1) + " - " + sldr.GetString(2);
|
||||
string system = Path.Combine(_datroot, sldr.GetString(1) + " - " + sldr.GetString(2));
|
||||
system = system.Trim();
|
||||
|
||||
if (!Directory.Exists(system))
|
||||
|
||||
Reference in New Issue
Block a user