diff options
| author | Eric Biggers <ebiggers@google.com> | 2020-05-14 19:48:23 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-14 19:48:23 -0700 |
| commit | 636698bb79ab182b72f7da6172fa3fd7ffd58e3c (patch) | |
| tree | 907ff56c3ef7a9b785dc8ef258f1a880fa738ec1 /cli-tests/t_encrypt.sh | |
| parent | bc9f5e542745f102de70ade555114eb28591fcd1 (diff) | |
cmd/fscrypt: fix up path formatting in ErrDirNotEmpty suggestion (#229)
Use %q, in case the paths contain whitespace. Also clean the directory
path to remove trailing slashes before appending the ".new" suffix.
Diffstat (limited to 'cli-tests/t_encrypt.sh')
| -rwxr-xr-x | cli-tests/t_encrypt.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cli-tests/t_encrypt.sh b/cli-tests/t_encrypt.sh index 9f19f5d..ffd6165 100755 --- a/cli-tests/t_encrypt.sh +++ b/cli-tests/t_encrypt.sh @@ -35,6 +35,9 @@ begin "Try to encrypt a nonempty directory" touch "$dir/file" _expect_failure "echo hunter2 | fscrypt encrypt --quiet '$dir'" show_status false +_print_header "=> with trailing slash" +_expect_failure "echo hunter2 | fscrypt encrypt --quiet '$dir/'" +show_status false begin "Encrypt a directory as non-root user" chown "$TEST_USER" "$dir" |