File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1332,7 +1332,7 @@ fn construct_dest_path(
1332
1332
Ok ( match target_type {
1333
1333
TargetType :: Directory => {
1334
1334
let root = if options. parents {
1335
- if source_path. has_root ( ) {
1335
+ if source_path. has_root ( ) && cfg ! ( unix ) {
1336
1336
Path :: new ( "/" )
1337
1337
} else {
1338
1338
Path :: new ( "" )
Original file line number Diff line number Diff line change @@ -5576,6 +5576,7 @@ fn test_preserve_attrs_overriding_2() {
5576
5576
5577
5577
/// Test the behavior of preserving permissions when copying through a symlink
5578
5578
#[ test]
5579
+ #[ cfg( unix) ]
5579
5580
fn test_cp_symlink_permissions ( ) {
5580
5581
let scene = TestScenario :: new ( util_name ! ( ) ) ;
5581
5582
let at = & scene. fixtures ;
@@ -5597,6 +5598,7 @@ fn test_cp_symlink_permissions() {
5597
5598
5598
5599
/// Test the behavior of preserving permissions of parents when copying through a symlink
5599
5600
#[ test]
5601
+ #[ cfg( unix) ]
5600
5602
fn test_cp_parents_symlink_permissions_file ( ) {
5601
5603
let scene = TestScenario :: new ( util_name ! ( ) ) ;
5602
5604
let at = & scene. fixtures ;
@@ -5620,6 +5622,7 @@ fn test_cp_parents_symlink_permissions_file() {
5620
5622
/// Test the behavior of preserving permissions of parents when copying through
5621
5623
/// a symlink when source is a dir.
5622
5624
#[ test]
5625
+ #[ cfg( unix) ]
5623
5626
fn test_cp_parents_symlink_permissions_dir ( ) {
5624
5627
let scene = TestScenario :: new ( util_name ! ( ) ) ;
5625
5628
let at = & scene. fixtures ;
@@ -5640,6 +5643,7 @@ fn test_cp_parents_symlink_permissions_dir() {
5640
5643
}
5641
5644
5642
5645
/// Test the behavior of copying a file to a destination with parents using absolute paths.
5646
+ #[ cfg( unix) ]
5643
5647
#[ test]
5644
5648
fn test_cp_parents_absolute_path ( ) {
5645
5649
let scene = TestScenario :: new ( util_name ! ( ) ) ;
You can’t perform that action at this time.
0 commit comments