File tree 2 files changed +6
-1
lines changed
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 {
338
338
let status_stream = self
339
339
. client
340
340
. list_status_iter (
341
- & prefix. map ( make_absolute_dir) . unwrap_or ( "" . to_string ( ) ) ,
341
+ & prefix. map ( make_absolute_dir) . unwrap_or ( "/ " . to_string ( ) ) ,
342
342
true ,
343
343
)
344
344
. into_stream ( )
Original file line number Diff line number Diff line change @@ -79,6 +79,11 @@ mod test {
79
79
assert_eq ! ( list. len( ) , 1 ) ;
80
80
assert_eq ! ( list[ 0 ] . as_ref( ) . unwrap( ) . location, Path :: from( "/testfile" ) ) ;
81
81
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
+
82
87
// Listing of a prefix that doesn't exist should return an empty result, not an error
83
88
assert_eq ! (
84
89
store. list( Some ( & Path :: from( "/doesnt/exist" ) ) ) . count( ) . await ,
You can’t perform that action at this time.
0 commit comments