File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -330,7 +330,7 @@ impl ObjectStore for HdfsObjectStore {
330330 let status_stream = self
331331 . client
332332 . list_status_iter (
333- & prefix. map ( make_absolute_dir) . unwrap_or ( "" . to_string ( ) ) ,
333+ & prefix. map ( make_absolute_dir) . unwrap_or ( "/ " . to_string ( ) ) ,
334334 true ,
335335 )
336336 . into_stream ( )
Original file line number Diff line number Diff line change @@ -79,6 +79,11 @@ mod test {
7979 assert_eq ! ( list. len( ) , 1 ) ;
8080 assert_eq ! ( list[ 0 ] . as_ref( ) . unwrap( ) . location, Path :: from( "/testfile" ) ) ;
8181
82+ // A list of None should be logically equivalent to /
83+ let list: Vec < object_store:: Result < ObjectMeta > > = store. list ( None ) . collect ( ) . await ;
84+ assert_eq ! ( list. len( ) , 1 ) ;
85+ assert_eq ! ( list[ 0 ] . as_ref( ) . unwrap( ) . location, Path :: from( "/testfile" ) ) ;
86+
8287 // Listing of a prefix that doesn't exist should return an empty result, not an error
8388 assert_eq ! (
8489 store. list( Some ( & Path :: from( "/doesnt/exist" ) ) ) . count( ) . await ,
You can’t perform that action at this time.
0 commit comments