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

fix: open changes dir to the target file's parent directory to prevent...

fix: open changes dir to the target file's parent directory to prevent exporting label files in current directory when tracking data file is not a descendant
parent 6c282b07
No related branches found
No related tags found
1 merge request!25Set of commits to be tagged v0.20.1
Pipeline #154883 passed
...@@ -54,8 +54,14 @@ function main(args=ARGS; exit_on_error=false) ...@@ -54,8 +54,14 @@ function main(args=ARGS; exit_on_error=false)
infile = parsed_args["<file-path>"] infile = parsed_args["<file-path>"]
if isempty(infile) if isempty(infile)
infile = nothing infile = nothing
elseif !(startswith(infile, "http://") || isfile(infile)) elseif !startswith(infile, "http://")
if isdir(infile) if isfile(infile)
dataroot = dirname(infile)
if !isempty(dataroot)
cd(dataroot)
infile = basename(infile)
end
elseif isdir(infile)
dataroot = infile dataroot = infile
infile = nothing infile = nothing
cd(dataroot) cd(dataroot)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment