diff --git a/Project.toml b/Project.toml index 8fa5ad39710be812814dfebe3887531544e3a3bc..d27e9f8dd872425254c852580c7b70725669bd00 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "PlanarLarvae" uuid = "c2615984-ef14-4d40-b148-916c85b43307" authors = ["François Laurent", "Institut Pasteur"] -version = "0.11.1" +version = "0.11.2" [deps] DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab" diff --git a/src/Datasets.jl b/src/Datasets.jl index 2b171bff4020ab29a523d89dbf9fab13ff5f9fb5..2f1d85c3200f2dfbfc29e674e3d17b73c2534850 100644 --- a/src/Datasets.jl +++ b/src/Datasets.jl @@ -1254,7 +1254,7 @@ function getdependencies(run::Run, filepath=nothing) deps = String[] for dep in object_or_array_of_objects(run.attributes[:dependencies]) datafile = dep[:filename] - if !isfile(datafile) + if !isnothing(filepath) dirpath = isdir(filepath) ? filepath : dirname(filepath) datafile = joinpath(dirpath, datafile) end diff --git a/src/Formats.jl b/src/Formats.jl index 7a39e9ad89b90ef1458b504c2bc67f862653c55c..81834c20c7ed36c194fa5f0e9c901b6c97dc4b0f 100644 --- a/src/Formats.jl +++ b/src/Formats.jl @@ -689,13 +689,13 @@ The returned array of files can be muted. """ find_associated_files(file::String) = find_associated_files(preload(file)) -function find_associated_files(files::Vector{String}) - unique(find_associated_files.(files)) do f +function find_associated_files(files::AbstractVector) + unique(Iterators.flatmap(find_associated_files, files)) do f f.source end end -find_associated_files(file) = PreloadedFile[file] +find_associated_files(file::PreloadedFile) = PreloadedFile[file] function find_associated_files(file::JSONLabels) getdependencies!(file)