in local repo, make relative links to the index.html page
This should make the local repo files portable, like if the app gets moved to the SD card or things like that.
This commit is contained in:
parent
54283b71fd
commit
7ca966be05
@ -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"));
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user