checkout: also chmod in the user checkout case

When falling back to copying, we previously would only chmod checked out
files in the non-user-checkout mode. Fix this by always doing chmod.
The file_mode was being prepared but never actually applied.

Add a basic test in the archive-z2 --> usermode checkout case in which
we're guaranteed to always fall back to copy mode.

Closes: #633

Closes: #903
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon authored and Atomic Bot committed 2017-06-02 17:46:16 +00:00
1 parent 3ec2b5773e
commit a32c6d2c70
4 files changed
+35 -13

No files matched your search

+7
View File
@@ -110,6 +110,13 @@ assert_file_has_content_literal () {
fi
}
assert_file_has_mode () {
mode=$(stat -c '%a' $1)
if [ "$mode" != "$2" ]; then
fatal "File '$1' has wrong mode: expected $2, but got $mode"
fi
}
assert_symlink_has_content () {
if ! test -L "$1"; then
fatal "File '$1' is not a symbolic link"