From 08e8fd7e38f2dae7c69c54eb22d508b6517e66e5 Mon Sep 17 00:00:00 2001 From: Pádraig Brady
Date: Sun, 1 Nov 2015 18:53:26 +0000 Subject: all: avoid quoting file names when possible Quote file names using the "shell-escape" or "shell-escape-always" methods, which quote as appropriate for most shells, and better support copy and paste of presented names. The "always" variant is used when the file name is embedded in an error message with surrounding spaces. * cfg.mk (sc_error_shell_quotes): A new syntax check rule to suggest quotef() where appropriate. (sc_error_shell_always_quotes): Likewise for quoteaf(). * src/system.h (quotef): A new define to apply shell quoting when needed. I.E. when shell character or ':' is present. (quoteaf): Likewise, but always quote. * src/*.c: Use quotef() and quoteaf() rather than quote() where appropriate. * tests/: Adjust accordingly. --- tests/rm/d-3.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/rm/d-3.sh') diff --git a/tests/rm/d-3.sh b/tests/rm/d-3.sh index af39da38b..1200ca459 100755 --- a/tests/rm/d-3.sh +++ b/tests/rm/d-3.sh @@ -28,7 +28,7 @@ printf "%s" \ > exp.err || framework_failure_ printf "%s\n" \ - "removed directory: 'd'" \ + "removed directory 'd'" \ > exp || framework_failure_ compare exp out || fail=1 -- cgit v1.2.3-70-g09d2