From 838d7a22467a4cdc02d48551e57be6d7ac65bd16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Laurent?= <francois.laurent@posteo.net>
Date: Wed, 1 Jun 2022 15:22:26 +0200
Subject: [PATCH] bugfix for previous commit

---
 src/files.jl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/files.jl b/src/files.jl
index 5b50b68..8896e04 100644
--- a/src/files.jl
+++ b/src/files.jl
@@ -270,9 +270,9 @@ function savetofile(controller, file; datafile=nothing)
                 datafile = gethub(controller)[:input][]
             end
         end
-        datafilepath = isfile(datafile) ? datafile : joinpath(cwd(controller), datafile)
-        deps = getdependencies(getinputfile(controller)[])
+        deps = getdependencies(gethub(controller)[:input][])
         if isempty(deps)
+            datafilepath = isfile(datafile) ? datafile : joinpath(cwd(controller), datafile)
             Datasets.pushdependency!(dataset, datafilepath)
         else
             for dep in deps
-- 
GitLab