diff --git a/src/org/fdroid/fdroid/Utils.java b/src/org/fdroid/fdroid/Utils.java index f071579a5..9b1f29ee3 100644 --- a/src/org/fdroid/fdroid/Utils.java +++ b/src/org/fdroid/fdroid/Utils.java @@ -118,7 +118,7 @@ public final class Utils { try { Process sh = Runtime.getRuntime().exec("sh"); OutputStream out = sh.getOutputStream(); - String command = "/system/bin/ln -s " + inFile.getAbsolutePath() + " " + outFile + String command = "/system/bin/ln -s " + inFile + " " + outFile + "\nexit\n"; out.write(command.getBytes("ASCII")); diff --git a/src/org/fdroid/fdroid/localrepo/LocalRepoManager.java b/src/org/fdroid/fdroid/localrepo/LocalRepoManager.java index 5b21235a2..a1d05ba7f 100644 --- a/src/org/fdroid/fdroid/localrepo/LocalRepoManager.java +++ b/src/org/fdroid/fdroid/localrepo/LocalRepoManager.java @@ -125,10 +125,10 @@ public class LocalRepoManager { // the user will always find the bootstrap page. File fdroidDirIndex = new File(fdroidDir, "index.html"); fdroidDirIndex.delete(); - Utils.symlinkOrCopyFile(indexHtml, fdroidDirIndex); + Utils.symlinkOrCopyFile(new File("../index.html"), fdroidDirIndex); File repoDirIndex = new File(repoDir, "index.html"); repoDirIndex.delete(); - Utils.symlinkOrCopyFile(indexHtml, repoDirIndex); + Utils.symlinkOrCopyFile(new File("../../index.html"), repoDirIndex); // add in /FDROID/REPO to support bad QR Scanner apps File fdroidCAPS = new File(fdroidDir.getParentFile(), "FDROID"); fdroidCAPS.mkdir(); @@ -136,10 +136,10 @@ public class LocalRepoManager { repoCAPS.mkdir(); File fdroidCAPSIndex = new File(fdroidCAPS, "index.html"); fdroidCAPSIndex.delete(); - Utils.symlinkOrCopyFile(indexHtml, fdroidCAPSIndex); + Utils.symlinkOrCopyFile(new File("../index.html"), fdroidCAPSIndex); File repoCAPSIndex = new File(repoCAPS, "index.html"); repoCAPSIndex.delete(); - Utils.symlinkOrCopyFile(indexHtml, repoCAPSIndex); + Utils.symlinkOrCopyFile(new File("../../index.html"), repoCAPSIndex); } catch (IOException e) { e.printStackTrace(); }