summaryrefslogtreecommitdiff
path: root/testsuite/itemize.test
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-02-18 17:16:08 -0800
committerWayne Davison <wayned@samba.org>2008-02-18 17:16:08 -0800
commit717d04669a3e07c2999e4d6221cbfd4a5eec2ec2 (patch)
tree4c30675f87b894380bdd7294a6e0cda006d4e227 /testsuite/itemize.test
parent15dbffc2150c77ef50616af268359e579e679bcd (diff)
downloadrsync-717d04669a3e07c2999e4d6221cbfd4a5eec2ec2.tar.gz
Fixed the hard-link check again, adding a comment as to
why it is coded the way it is.
Diffstat (limited to 'testsuite/itemize.test')
-rw-r--r--testsuite/itemize.test8
1 files changed, 5 insertions, 3 deletions
diff --git a/testsuite/itemize.test b/testsuite/itemize.test
index 636751e4..0b7300c2 100644
--- a/testsuite/itemize.test
+++ b/testsuite/itemize.test
@@ -26,13 +26,15 @@ ln -s ../bar/baz/rsync "$fromdir/foo/sym"
umask 022
ln "$fromdir/foo/config1" "$fromdir/foo/extra"
-# Check if the OS can hard-link symlinks or not
-if ln "$fromdir/foo/sym" "$to2dir" 2>/dev/null; then
+# Check if the OS can hard-link symlinks or not.
+# (Note: the link we check MUST NOT point to a valid file!)
+ln -s no-such-dir "$to2dir"
+if ln "$to2dir" "$to2dir.test" 2>/dev/null; then
L=hL
else
L=cL
fi
-rm -f "$to2dir"
+rm -f "$to2dir" "$to2dir.test"
# Check if rsync can preserve time on symlinks
case "$RSYNC" in