Correct symbolic link destination on manifest Java download

Signed-off-by: Kenneth Chew <79120643+kthchew@users.noreply.github.com>
This commit is contained in:
Kenneth Chew 2024-12-16 02:27:26 -05:00
parent 507faf9f00
commit 8d53242952
No known key found for this signature in database

View File

@ -86,11 +86,10 @@ void ManifestDownloadTask::downloadJava(const QJsonDocument& doc)
if (type == "directory") {
FS::ensureFolderPathExists(file);
} else if (type == "link") {
// this is linux only !
// this is *nix only !
auto path = Json::ensureString(meta, "target");
if (!path.isEmpty()) {
auto target = FS::PathCombine(file, "../" + path);
QFile(target).link(file);
QFile::link(path, file);
}
} else if (type == "file") {
// TODO download compressed version if it exists ?