]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: other-fs-tmpdir: don't misbehave for quote-unfriendly $TMPDIR
authorJim Meyering <meyering@redhat.com>
Sat, 29 Aug 2009 07:18:45 +0000 (09:18 +0200)
committerJim Meyering <meyering@redhat.com>
Sat, 29 Aug 2009 17:19:37 +0000 (19:19 +0200)
* tests/other-fs-tmpdir: Quote uses of variables that might expand
to strings containing e.g., whitespace.

tests/other-fs-tmpdir

index 4340ac5d6469307a2a9961df8cac6848167c9f83..1035978367e1df0692d7c632c7d17eded7888ab2 100644 (file)
@@ -29,12 +29,12 @@ dot_mount_point=`stat -c %d .`
 for d in $CANDIDATE_TMP_DIRS; do
 
   # Skip nonexistent directories.
-  test -d $d || continue
+  test -d "$d" || continue
 
-  d_mount_point=`stat -L -c %d $d`
+  d_mount_point=`stat -L -c %d "$d"`
 
   # Same partition?  Skip it.
-  test x$d_mount_point = x$dot_mount_point && continue
+  test "x$d_mount_point" = "x$dot_mount_point" && continue
 
   # See if we can create a directory in it.
   if mkdir "$d/tmp$$" > /dev/null 2>&1; then