Skip to content
Snippets Groups Projects
Commit 366805e7 authored by François  LAURENT's avatar François LAURENT
Browse files

fixes #15 and #16

parent eb21ad62
No related branches found
No related tags found
1 merge request!1Bugfixes for #15, #16 and #17
Pipeline #104980 failed
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"
......
......@@ -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
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment