From 3f71bf6a98d501685a637bc7ceaeb81726f6a915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20H=C3=A6gland?= Date: Sun, 20 Nov 2022 12:06:16 +0100 Subject: [PATCH] Don't use forward slashes in a relative symlink target Don't use forward slashes in a relative symlink target on Windows. For more information see issue #271. This fixes issue #273. --- t/recurse.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/t/recurse.t b/t/recurse.t index f40c3db..d760b18 100644 --- a/t/recurse.t +++ b/t/recurse.t @@ -107,7 +107,13 @@ subtest 'with symlinks' => sub { path($_)->touchpath for @tree; - symlink path( 'cccc', 'eeee' ), path('pppp'); + if ($^O eq "MSWin32") { + # need to use backward slashes in relative symlink target on MSWin32 + symlink 'cccc\eeee', path('pppp'); + } + else { + symlink path( 'cccc', 'eeee' ), path('pppp'); + } symlink path('aaaa.txt'), path('qqqq.txt'); subtest 'no follow' => sub {