Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a531123

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 56c7140 commit a531123

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
@@ -479,15 +479,17 @@ sub CopyIncludeFiles
479479
my $D;
480480
opendir($D, 'src/include') || croak "Could not opendir on src/include!\n";
481481

482+
# some xcopy progs don't like mixed slash style paths
483+
(my $ctarget = $target) =~ s!/!\\!g;
482484
while (my $d = readdir($D))
483485
{
484486
next if ($d =~ /^\./);
485487
next if ($d eq '.git');
486488
next if ($d eq 'CVS');
487-
next unless (-d 'src/include/' . $d);
489+
next unless (-d "src/include/$d");
488490

489-
EnsureDirectories($target . '/include/server', $d);
490-
system("xcopy /s /i /q /r /y src\\include\\$d\\*.h \"$target\\include\\server\\$d\\\"")
491+
EnsureDirectories("$target/include/server/$d");
492+
system(qq{xcopy /s /i /q /r /y src\\include\\$d\\*.h "$ctarget\\include\\server\\$d\\"})
491493
&& croak("Failed to copy include directory $d\n");
492494
}
493495
closedir($D);

0 commit comments

Comments
 (0)