Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make importAllTilesets work on unix #1533

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading