From 707a8e77c65b58c6f47baa3d041abf07741d959e Mon Sep 17 00:00:00 2001 From: elig0n <31196036+elig0n@users.noreply.github.com> Date: Thu, 13 Jun 2024 11:07:26 +0300 Subject: [PATCH] Update termux-restore.in Use one 'find' run to fix files permissions --- scripts/termux-restore.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/termux-restore.in b/scripts/termux-restore.in index ef2d960..39efa46 100644 --- a/scripts/termux-restore.in +++ b/scripts/termux-restore.in @@ -99,8 +99,7 @@ fi # Ensure that prefix doesn't contain read-only files. msg "Fixing read-write access to files where necessary..." -find "@TERMUX_PREFIX@" -type d -print0 | xargs -0 -r chmod u+rwx -find "@TERMUX_PREFIX@" -type f -print0 | xargs -0 -r chmod u+rw +find "@TERMUX_PREFIX@" -type d,f -print0 | xargs -0 -r chmod u+rwX # --recursive-unlink is added intentionally to delete all orphan/extra files # in $PREFIX. It must be restored to a clean state as in backup tarball.