Skip to content

Commit

Permalink
installer: fix permissions for lib/apt/apt-helper
Browse files Browse the repository at this point in the history
It should have executable bit set, otherwise it won't be possible to use tools such as 'apt-file' without reinstalling 'apt'.
  • Loading branch information
Leonid Pliushch authored Jul 10, 2021
1 parent 6fa4b9b commit 1b62f7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/main/java/com/termux/app/TermuxInstaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ public void run() {
while ((readBytes = zipInput.read(buffer)) != -1)
outStream.write(buffer, 0, readBytes);
}
if (zipEntryName.startsWith("bin/") || zipEntryName.startsWith("libexec") || zipEntryName.startsWith("lib/apt/methods")) {
if (zipEntryName.startsWith("bin/") || zipEntryName.startsWith("libexec") ||
zipEntryName.startsWith("lib/apt/apt-helper") || zipEntryName.startsWith("lib/apt/methods")) {
//noinspection OctalInteger
Os.chmod(targetFile.getAbsolutePath(), 0700);
}
Expand Down

0 comments on commit 1b62f7c

Please sign in to comment.