mirror of
https://github.com/TheLocehiliosan/yadm
synced 2024-10-27 20:34:27 +00:00
Merge pull request #246 from vendion/develop
This commit is contained in:
commit
b45aba385e
3
yadm
3
yadm
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user