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 @@ -338,7 +338,7 @@ impl ObjectStore for HdfsObjectStore {
338338 let status_stream = self
339339 . client
340340 . list_status_iter (
341- & prefix. map ( make_absolute_dir) . unwrap_or ( "" . to_string ( ) ) ,
341+ & prefix. map ( make_absolute_dir) . unwrap_or ( "/ " . to_string ( ) ) ,
342342 true ,
343343 )
344344 . 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