Skip to content

Commit

Permalink
Disable error flashes when clearing TMPDIR directory on termux app exit
Browse files Browse the repository at this point in the history
Rooted users were getting `Clearing $TMPDIR directory at path "/data/data/com.termux/files/usr/tmp" failed` flash errors when they exited Termux if directories existed in TMPDIR that only had `root` user ownership, since they would fail to get cleared since clearing was being run as the termux app user instead of as the root user. Now errors will only be logged to logcat.
  • Loading branch information
agnostic-apollo committed May 1, 2021
1 parent b84854a commit b268b6e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public static void clearTermuxTMPDIR(Context context, boolean onlyIfExists) {
String errmsg;
errmsg = FileUtils.clearDirectory(context, "$TMPDIR", FileUtils.getCanonicalPath(TermuxConstants.TERMUX_TMP_PREFIX_DIR_PATH, null, false));
if (errmsg != null) {
Logger.logErrorAndShowToast(context, errmsg);
Logger.logError(errmsg);
}
}

Expand Down

0 comments on commit b268b6e

Please sign in to comment.