Skip to content

Commit e23b798

Browse files
authored
check file exists on loadDFG
1 parent 2f4e1a1 commit e23b798

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/FileDFG/services/FileDFG.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ function loadDFG!(dfgLoadInto::AbstractDFG, dst::String)
102102
lastdirname *= ".tar.gz"
103103
end
104104
end
105+
# check the file actually exists
106+
@assert isfile(dstname) "cannot find file $dstname"
105107
# TODO -- what if it is not a tar.gz but classic folder instead?
106108
# do actual unzipping
107109
filename = lastdirname[1:(end-length(".tar.gz"))] |> string

0 commit comments

Comments
 (0)