From f4c02500409136a143595e674759696ebb992719 Mon Sep 17 00:00:00 2001 From: "K. R. Walker" Date: Mon, 22 Nov 2021 10:21:24 -0700 Subject: [PATCH] Fix bad relative paths in generated include files Our use of perl from Git for Windows seems to force File::Spec into a UNIX mode. Instead we explicitly use File::Spec::Win32 if we detect (or have been forced) to use Windows paths. --- libexec/syncqt.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libexec/syncqt.pl b/libexec/syncqt.pl index 593401bfe8b..16e0467c68b 100755 --- a/libexec/syncqt.pl +++ b/libexec/syncqt.pl @@ -47,6 +47,7 @@ use File::Basename; use File::Path; use File::Spec; +use File::Spec::Win32; use Cwd; use Cwd 'abs_path'; use Config; @@ -506,7 +507,8 @@ sub cleanupPath { sub fixPaths { my ($file, $dir) = @_; - my $out = File::Spec->abs2rel(cleanupPath($file), cleanupPath($dir)); + my $fileSpecModule = $isunix ? "File::Spec" : "File::Spec::Win32"; + my $out = $fileSpecModule->abs2rel(cleanupPath($file), cleanupPath($dir)); $out =~ s,\\,/,g; $out = "\"$out\"" if ($out =~ / /); return $out;