From 636698bb79ab182b72f7da6172fa3fd7ffd58e3c Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 14 May 2020 19:48:23 -0700 Subject: 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. --- cli-tests/t_encrypt.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cli-tests/t_encrypt.sh') 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" -- cgit v1.2.3