"No files detected or unable to read file format" on empty dirs in object store

I get the error “No files detected or unable to read file format with selected option” when Dremio reaches an empty “directory” within an S3-like object store source. Is there a setting that would allow Dremio to just ignore that directory and continue on?

v4.2.1

Some more info:

I added an empty file in the empty leaf directories thinking that it might be enough to get Dremio to continue, but now I get “The top level of your document must either be a single array of maps or a set of white space delimited maps.”

The empty file is a .json file with just this:

[{}]

I also tried with this:

[]

and got the same error.