Correct symbolic link destination on manifest Java download

Signed-off-by: Kenneth Chew <79120643+kthchew@users.noreply.github.com>
(cherry picked from commit 8d53242952ceeed11bd1a57c9ac43344d854ac8c)
This commit is contained in:
Kenneth Chew 2024-12-16 02:27:26 -05:00 committed by github-actions[bot]
parent 072c495ec6
commit 9cb2a3ab2d

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 ?