If the out_path argument to weave contains a "." character in the last segment, e.g. "/path/1.2" then the file ends up being saved to e.g. "/path/1.html".
I don't think this is the case with an ending slash e.g. "/path/1.2/".
One reason to have a "." character like this is using a timestamp as a folder for an experiment, e.g. Dates.now() == 2022-02-21T16:22:11.715.
It calls splitext before checking whether a folder or file was passed.
Perhaps it could instead condition on isdir and then if not isdir, call splitext to get the file extension.
Should be reproduced by calling something like weave("/path/to/script.jl"; doctype="md2html", out_path="/some/other/path/1.2") and observing where the HTML file is saved.
description
If the
out_path
argument toweave
contains a"."
character in the last segment, e.g."/path/1.2"
then the file ends up being saved to e.g."/path/1.html"
. I don't think this is the case with an ending slash e.g."/path/1.2/"
. One reason to have a"."
character like this is using a timestamp as a folder for an experiment, e.g.Dates.now() == 2022-02-21T16:22:11.715
.I think the reason is here: https://github.com/JunoLab/Weave.jl/blob/381de22c7d4076fc210147f552c6e4132f6c805c/src/run.jl#L117-L130
It calls
splitext
before checking whether a folder or file was passed. Perhaps it could instead condition onisdir
and then if notisdir
, callsplitext
to get the file extension.versions
minimum reproducible steps
Should be reproduced by calling something like
weave("/path/to/script.jl"; doctype="md2html", out_path="/some/other/path/1.2")
and observing where the HTML file is saved.