FIx link error

This commit is contained in:
ShirosakiMio 2022-11-04 10:53:06 +08:00
parent ed233f454a
commit 3624b1ba27
1 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package com.tungsten.fcl.util;
import android.content.Context;
import android.system.Os;
import android.util.Log;
import com.tungsten.fclauncher.FCLauncher;
import com.tungsten.fclauncher.utils.Architecture;
@ -96,7 +97,8 @@ public class RuntimeUtils {
if (tarEntry.isSymbolicLink()) {
Objects.requireNonNull(destPath.getParentFile()).mkdirs();
try {
Os.symlink(tarEntry.getName(), tarEntry.getLinkName());
// Os.symlink(tarEntry.getName(), tarEntry.getLinkName());
Os.symlink(tarEntry.getLinkName().replace("..",dest.getAbsolutePath()), new File(dest,tarEntry.getName()).getAbsolutePath());
} catch (Throwable e) {
Logging.LOG.log(Level.WARNING, e.getMessage());
}