Merge pull request #246 from vendion/develop

This commit is contained in:
Tim Byrne 2020-08-20 13:05:41 -05:00
commit b45aba385e
No known key found for this signature in database
GPG Key ID: 14DB4FC2465A4B12
1 changed files with 2 additions and 1 deletions

3
yadm
View File

@ -1944,7 +1944,8 @@ function get_mode {
mode=$(stat -c '%a' "$filename" 2>/dev/null)
if [ -z "$mode" ] ; then
# BSD-style
mode=$(stat -f '%A' "$filename" 2>/dev/null)
# Using the `cut` command to match the output of GNU stat output
mode=$(stat -f '%p' "$filename" | cut -c4-6 2>/dev/null)
fi
# only accept results if they are octal