From 95db70570d3ef6a55efd6a7c54da8e32e6a33365 Mon Sep 17 00:00:00 2001 From: Wade Barnes Date: Mon, 22 Jan 2024 07:18:38 -0800 Subject: [PATCH] Fix folder permission check - Affecting MAC and Linux Signed-off-by: Wade Barnes --- manage | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/manage b/manage index ee883d3..748a642 100755 --- a/manage +++ b/manage @@ -857,12 +857,15 @@ function checkFolderPermissions() { } function setFolderReadWriteAll() { - folder=${1} - permissions=$(stat ${STAT_OPS} ${folder}) - - if [[ "${permissions:0-1}" != 5 ]]; then - echo "Setting ${folder} to read/write for all users ..." - chmod a+rws ${folder} + # This has no impact on Windows. The chmod command will run but the permissions don't actually change. + if [[ "$OSTYPE" != "msys" ]]; then + folder=${1} + permissions=$(stat ${STAT_OPS} ${folder}) + + if [[ "${permissions:0-1}" != 7 ]]; then + echo "Setting ${folder} to read/write for all users ..." + chmod a+rws ${folder} + fi fi }