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:
@@ -20,7 +20,7 @@ namespace SabreTools.Helper
|
||||
/// <param name="rom">RomData representing the new information</param>
|
||||
public static void WriteToArchive(string input, string output, Rom rom)
|
||||
{
|
||||
string archiveFileName = output + Path.DirectorySeparatorChar + rom.Game + ".zip";
|
||||
string archiveFileName = Path.Combine(output, rom.Game + ".zip");
|
||||
|
||||
ZipArchive outarchive = null;
|
||||
try
|
||||
@@ -212,8 +212,8 @@ namespace SabreTools.Helper
|
||||
logger.Log("Current entry name: '" + reader.Entry.Key + "'");
|
||||
if (reader.Entry != null && reader.Entry.Key.Contains(entryname))
|
||||
{
|
||||
reader.WriteEntryToFile(tempdir + Path.DirectorySeparatorChar + reader.Entry.Key);
|
||||
outfile = tempdir + Path.DirectorySeparatorChar + reader.Entry.Key;
|
||||
outfile = Path.Combine(tempdir, reader.Entry.Key);
|
||||
reader.WriteEntryToFile(outfile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -423,9 +423,8 @@ namespace SabreTools.Helper
|
||||
if (datdata.RepExt != "")
|
||||
{
|
||||
string dir = Path.GetDirectoryName(name);
|
||||
dir = (dir.EndsWith(Path.DirectorySeparatorChar.ToString()) ? dir : dir + Path.DirectorySeparatorChar);
|
||||
dir = (dir.StartsWith(Path.DirectorySeparatorChar.ToString()) ? dir.Remove(0, 1) : dir);
|
||||
name = dir + Path.GetFileNameWithoutExtension(name) + datdata.RepExt;
|
||||
name = Path.Combine(dir, Path.GetFileNameWithoutExtension(name) + datdata.RepExt);
|
||||
}
|
||||
if (datdata.AddExt != "")
|
||||
{
|
||||
@@ -433,7 +432,7 @@ namespace SabreTools.Helper
|
||||
}
|
||||
if (!datdata.UseGame && datdata.GameName)
|
||||
{
|
||||
name = (rom.Game.EndsWith(Path.DirectorySeparatorChar.ToString()) ? rom.Game : rom.Game + Path.DirectorySeparatorChar) + name;
|
||||
name = Path.Combine(rom.Game, name);
|
||||
}
|
||||
|
||||
if (datdata.UseGame && rom.Game != lastgame)
|
||||
|
||||
Reference in New Issue
Block a user