We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddd98d6 commit 2d1de9dCopy full SHA for 2d1de9d
src/DatasetAPI/Datasets.jl
@@ -331,7 +331,17 @@ testrange(x::AbstractArray{<:TimeType}) = x
331
332
testrange(x::AbstractArray{<:AbstractString}) = x
333
334
-_glob(x) = startswith(x, "/") ? glob(x[2:end], "/") : glob(x)
+
335
+# This is a bit unfortunate since it will disallow globbing hierarchies of directories,
336
+# but necessary to have it work on both windows and Unix systems
337
+function _glob(x)
338
+ if isabspath(x)
339
+ p, rest = splitdir(x)
340
+ glob(rest,p)
341
+ else
342
+ glob(x)
343
+ end
344
+end
345
346
open_mfdataset(g::AbstractString; kwargs...) = open_mfdataset(_glob(g); kwargs...)
347
open_mfdataset(g::Vector{<:AbstractString}; kwargs...) =
0 commit comments