Fix track manager issues

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

No files matched your search

+4 -7
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;
}
}
}