Skip to content

Commit a5c629f

Browse files
committed
Avoid use of mixed slash style paths in arguments to xcopy in MSVC builds.
Some versions of xcopy, notably on Windows 7 don't like it. Backpatch to 8.3, where we first used xcopy.
1 parent bb3051e commit a5c629f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/tools/msvc/Install.pm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,15 +437,17 @@ sub CopyIncludeFiles
437437
my $D;
438438
opendir($D, 'src/include') || croak "Could not opendir on src/include!\n";
439439

440+
# some xcopy progs don't like mixed slash style paths
441+
(my $ctarget = $target) =~ s!/!\\!g;
440442
while (my $d = readdir($D))
441443
{
442444
next if ($d =~ /^\./);
443445
next if ($d eq '.git');
444446
next if ($d eq 'CVS');
445-
next unless (-d 'src/include/' . $d);
447+
next unless (-d "src/include/$d");
446448

447-
EnsureDirectories($target . '/include/server', $d);
448-
system("xcopy /s /i /q /r /y src\\include\\$d\\*.h \"$target\\include\\server\\$d\\\"")
449+
EnsureDirectories("$target/include/server/$d");
450+
system(qq{xcopy /s /i /q /r /y src\\include\\$d\\*.h "$ctarget\\include\\server\\$d\\"})
449451
&& croak("Failed to copy include directory $d\n");
450452
}
451453
closedir($D);

0 commit comments

Comments
 (0)