@@ -499,12 +499,11 @@ fn map_entry(
499499 Node :: new_node ( name, NodeType :: Dir , meta)
500500 } else if m. is_symlink ( ) {
501501 let path = entry. path ( ) ;
502- let target = read_link ( path)
503- . map_err ( |err| IgnoreErrorKind :: ErrorLink {
504- path : path. to_path_buf ( ) ,
505- source : err,
506- } ) ?
507- . as_encoded_bytes ( ) ;
502+ let target = read_link ( path) . map_err ( |err| IgnoreErrorKind :: ErrorLink {
503+ path : path. to_path_buf ( ) ,
504+ source : err,
505+ } ) ?;
506+ let target = target. as_os_str ( ) . as_encoded_bytes ( ) ;
508507 let node_type = NodeType :: from_link ( & target) ;
509508 Node :: new_node ( name, node_type, meta)
510509 } else {
@@ -688,13 +687,11 @@ fn map_entry(
688687 Node :: new_node ( name, NodeType :: Dir , meta)
689688 } else if m. is_symlink ( ) {
690689 let path = entry. path ( ) ;
691- let target = read_link ( path)
692- . map_err ( |err| IgnoreErrorKind :: ErrorLink {
693- path : path. to_path_buf ( ) ,
694- source : err,
695- } ) ?
696- . into_os_string ( ) ;
697- let target = target. as_encoded_bytes ( ) ;
690+ let target = read_link ( path) . map_err ( |err| IgnoreErrorKind :: ErrorLink {
691+ path : path. to_path_buf ( ) ,
692+ source : err,
693+ } ) ?;
694+ let target = target. as_os_str ( ) . as_encoded_bytes ( ) ;
698695 let node_type = NodeType :: from_link ( & UnixPath :: new ( target) . to_typed_path ( ) ) ;
699696 Node :: new_node ( name, node_type, meta)
700697 } else if filetype. is_block_device ( ) {
0 commit comments