From b268b6edf742db9d344e5631b1dd134e54a39351 Mon Sep 17 00:00:00 2001 From: agnostic-apollo Date: Sat, 1 May 2021 23:31:02 +0500 Subject: [PATCH] Disable error flashes when clearing TMPDIR directory on termux app exit 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. --- .../src/main/java/com/termux/shared/shell/ShellUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/termux-shared/src/main/java/com/termux/shared/shell/ShellUtils.java b/termux-shared/src/main/java/com/termux/shared/shell/ShellUtils.java index 47ad08bb..fe1efc8d 100644 --- a/termux-shared/src/main/java/com/termux/shared/shell/ShellUtils.java +++ b/termux-shared/src/main/java/com/termux/shared/shell/ShellUtils.java @@ -157,7 +157,7 @@ public class ShellUtils { 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); } }