mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-24 02:42:15 +02:00
Merge pull request #3214 from kthchew/fix/manifest-symlink
Correct symbolic link destination on manifest (Mojang) Java download
This commit is contained in:
commit
2a2ed9f8bd
@ -86,11 +86,10 @@ void ManifestDownloadTask::downloadJava(const QJsonDocument& doc)
|
|||||||
if (type == "directory") {
|
if (type == "directory") {
|
||||||
FS::ensureFolderPathExists(file);
|
FS::ensureFolderPathExists(file);
|
||||||
} else if (type == "link") {
|
} else if (type == "link") {
|
||||||
// this is linux only !
|
// this is *nix only !
|
||||||
auto path = Json::ensureString(meta, "target");
|
auto path = Json::ensureString(meta, "target");
|
||||||
if (!path.isEmpty()) {
|
if (!path.isEmpty()) {
|
||||||
auto target = FS::PathCombine(file, "../" + path);
|
QFile::link(path, file);
|
||||||
QFile(target).link(file);
|
|
||||||
}
|
}
|
||||||
} else if (type == "file") {
|
} else if (type == "file") {
|
||||||
// TODO download compressed version if it exists ?
|
// TODO download compressed version if it exists ?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user