@@ -27,7 +27,7 @@ use uucore::fs::{
27
27
are_hardlinks_or_one_way_symlink_to_same_file, are_hardlinks_to_same_file,
28
28
path_ends_with_terminator,
29
29
} ;
30
- #[ cfg( all( unix, not( target_os = "macos" ) ) ) ]
30
+ #[ cfg( all( unix, not( any ( target_os = "macos" , target_os = "redox" ) ) ) ) ]
31
31
use uucore:: fsxattr;
32
32
use uucore:: update_control;
33
33
@@ -634,7 +634,7 @@ fn rename_with_fallback(
634
634
None
635
635
} ;
636
636
637
- #[ cfg( all( unix, not( target_os = "macos" ) ) ) ]
637
+ #[ cfg( all( unix, not( any ( target_os = "macos" , target_os = "redox" ) ) ) ) ]
638
638
let xattrs =
639
639
fsxattr:: retrieve_xattrs ( from) . unwrap_or_else ( |_| std:: collections:: HashMap :: new ( ) ) ;
640
640
@@ -648,7 +648,7 @@ fn rename_with_fallback(
648
648
move_dir ( from, to, & options)
649
649
} ;
650
650
651
- #[ cfg( all( unix, not( target_os = "macos" ) ) ) ]
651
+ #[ cfg( all( unix, not( any ( target_os = "macos" , target_os = "redox" ) ) ) ) ]
652
652
fsxattr:: apply_xattrs ( to, xattrs) . unwrap ( ) ;
653
653
654
654
if let Err ( err) = result {
@@ -661,11 +661,11 @@ fn rename_with_fallback(
661
661
} ;
662
662
}
663
663
} else {
664
- #[ cfg( all( unix, not( target_os = "macos" ) ) ) ]
664
+ #[ cfg( all( unix, not( any ( target_os = "macos" , target_os = "redox" ) ) ) ) ]
665
665
fs:: copy ( from, to)
666
666
. and_then ( |_| fsxattr:: copy_xattrs ( & from, & to) )
667
667
. and_then ( |_| fs:: remove_file ( from) ) ?;
668
- #[ cfg( any( target_os = "macos" , not( unix) ) ) ]
668
+ #[ cfg( any( target_os = "macos" , target_os = "redox" , not( unix) ) ) ]
669
669
fs:: copy ( from, to) . and_then ( |_| fs:: remove_file ( from) ) ?;
670
670
}
671
671
}
0 commit comments