Skip to content

Commit b268b6e

Browse files
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.
1 parent b84854a commit b268b6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

termux-shared/src/main/java/com/termux/shared/shell/ShellUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public static void clearTermuxTMPDIR(Context context, boolean onlyIfExists) {
157157
String errmsg;
158158
errmsg = FileUtils.clearDirectory(context, "$TMPDIR", FileUtils.getCanonicalPath(TermuxConstants.TERMUX_TMP_PREFIX_DIR_PATH, null, false));
159159
if (errmsg != null) {
160-
Logger.logErrorAndShowToast(context, errmsg);
160+
Logger.logError(errmsg);
161161
}
162162
}
163163

0 commit comments

Comments
 (0)