Skip to content

Commit

Permalink
Merge pull request #1533 from Miepee/importTilesets
Browse files Browse the repository at this point in the history
Make importAllTilesets work on unix
  • Loading branch information
colinator27 authored Nov 17, 2023
2 parents 838a1dd + 4483df5 commit 47aef7a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ EnsureDataLoaded();
// Setup root export folder.
string winFolder = GetFolder(FilePath); // The folder data.win is located in.

string subPath = winFolder + "Export_Tilesets";
string subPath = Path.Combine(winFolder, "Export_Tilesets");
int i = 0;

string GetFolder(string path)
Expand All @@ -21,7 +21,7 @@ string GetFolder(string path)
}

// Folder Check One
if (!Directory.Exists(winFolder + "Export_Tilesets\\"))
if (!Directory.Exists(subPath))
{
ScriptError("There is no 'Export_Tilesets' folder to import.", "Error: Nothing to import.");
return;
Expand All @@ -46,7 +46,7 @@ void ImportTileset(UndertaleBackground tileset)
{
try
{
string path = subPath + "\\" + tileset.Name.Content + ".png";
string path = Path.Combine(subPath, tileset.Name.Content + ".png");
if (File.Exists(path))
{
Bitmap img = new Bitmap(path);
Expand Down

0 comments on commit 47aef7a

Please sign in to comment.