Browse Source

Fixed issue with dirname()

`dirname` returns an empty string instead of a filepath such as "." when the input string does not have one.
This fixes that issue.
pull/12/head v0.3.1
Tim Wheeler 6 years ago
parent
commit
3d7c404810
  1. 3
      src/TikzPictures.jl

3
src/TikzPictures.jl

@ -144,6 +144,9 @@ end @@ -144,6 +144,9 @@ end
function save(f::PDF, tp::TikzPicture)
# Generate the .tex file and make pass along any possible errors
foldername = dirname(f.filename)
if isempty(foldername)
foldername = "."
end
save(TEX(f.filename * ".tex"), tp) # Save the tex file in the directory that was given
# This will throw an error if the directory doesn't exist

Loading…
Cancel
Save