Skip to content
Snippets Groups Projects
Commit 7ad9e68f authored by akiraohgaki's avatar akiraohgaki
Browse files

Fix for destinations

parent 04f5a379
No related branches found
No related tags found
No related merge requests found
......@@ -66,21 +66,23 @@ QJsonObject XdgUrl::_importDestinations()
foreach (const QString key, appConfigDestinations.keys()) {
QString value = appConfigDestinations[key].toString();
if (value.startsWith("$HOME")) {
destinations[key] = value.replace("$HOME", Utility::File::homePath());
value = value.replace("$HOME", Utility::File::homePath());
}
else if (value.startsWith("$XDG_DATA")) {
destinations[key] = value.replace("$XDG_DATA", Utility::File::xdgDataHomePath());
value = value.replace("$XDG_DATA", Utility::File::xdgDataHomePath());
}
else if (value.startsWith("$KDE_DATA")) {
destinations[key] = value.replace("$KDE_DATA", Utility::File::kdeDataHomePath());
value = value.replace("$KDE_DATA", Utility::File::kdeDataHomePath());
}
destinations[key] = value;
}
foreach (const QString key, appConfigDestinationsAlias.keys()) {
QString value = appConfigDestinationsAlias[key].toString();
if (destinations.contains(value)) {
destinations[key] = destinations.value(value);
value = destinations[value].toString();
}
destinations[key] = value;
}
return destinations;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment