Skip to content

Commit 7ed127c

Browse files
authored
Merge pull request #290 from WadeBarnes/folder-permissions
Fix folder permission check
2 parents b041b9a + 95db705 commit 7ed127c

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

manage

+9-6
Original file line numberDiff line numberDiff line change
@@ -857,12 +857,15 @@ function checkFolderPermissions() {
857857
}
858858

859859
function setFolderReadWriteAll() {
860-
folder=${1}
861-
permissions=$(stat ${STAT_OPS} ${folder})
862-
863-
if [[ "${permissions:0-1}" != 5 ]]; then
864-
echo "Setting ${folder} to read/write for all users ..."
865-
chmod a+rws ${folder}
860+
# This has no impact on Windows. The chmod command will run but the permissions don't actually change.
861+
if [[ "$OSTYPE" != "msys" ]]; then
862+
folder=${1}
863+
permissions=$(stat ${STAT_OPS} ${folder})
864+
865+
if [[ "${permissions:0-1}" != 7 ]]; then
866+
echo "Setting ${folder} to read/write for all users ..."
867+
chmod a+rws ${folder}
868+
fi
866869
fi
867870
}
868871

0 commit comments

Comments
 (0)