Update StorageManager.cpp

This commit is contained in:
Bashar Astifan 2023-05-03 13:44:52 +04:00
parent 808ff28aa5
commit 37eca9b95a

View File

@ -87,13 +87,13 @@ std::string GetMusicFolder() {
std::string GetPreviewPath(std::string path) {
std::string pathView = path;
if (Path(GetLocalFolder()) == Path(path + "\\LocalState")) {
return "AppData";
}
pathView = ReplaceAll(pathView, "/", "\\");
pathView = ReplaceAll(pathView, GetLocalFolder(), "LocalState");
pathView = ReplaceAll(pathView, GetTempFolder(), "TempState");
pathView = ReplaceAll(pathView, GetInstallationFolder(), "Installation folder");
auto appData = ReplaceAll(GetLocalFolder(), "\\LocalState", "");
pathView = ReplaceAll(pathView, appData, "AppData");
return pathView;
}
bool isLocalState(std::string path) {