1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Fix track manager issues

This commit is contained in:
Ted John
2016-10-23 00:42:22 +01:00
parent f489bba4f0
commit 9eaf887546
2 changed files with 15 additions and 7 deletions

View File

@@ -135,6 +135,7 @@ public:
if (platform_file_delete(path))
{
_items.erase(_items.begin() + index);
result = true;
}
}
}
@@ -153,19 +154,15 @@ public:
utf8 newPath[MAX_PATH];
Path::GetDirectory(newPath, sizeof(newPath), path);
Path::Append(newPath, sizeof(newPath), newName);
Path::Append(newPath, sizeof(newPath), Path::GetExtension(path));
String::Append(newPath, sizeof(newPath), Path::GetExtension(path));
if (platform_file_move(path, newPath))
{
item->Name = std::string(newName);
item->Path = std::string(newPath);
SortItems();
item = GetTrackItem(path);
if (item != nullptr)
{
result = item->Path.c_str();
}
result = newPath;
}
}
}