Merge pull request #2122 from JackDevine/expand_path

Expand paths beginning with ~ on unix systems.
This commit is contained in:
Jack Devine 2019-08-06 21:30:49 +12:00 committed by GitHub
commit 79777adc07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ function buildanimation(animdir::AbstractString, fn::AbstractString,
fps::Integer = 20, loop::Integer = 0,
variable_palette::Bool=false,
show_msg::Bool=true)
fn = abspath(fn)
fn = abspath(expanduser(fn))
if is_animated_gif
if variable_palette

View File

@ -103,7 +103,7 @@ type is inferred from the file extension. All backends support png and pdf
file types, some also support svg, ps, eps, html and tex.
"""
function savefig(plt::Plot, fn::AbstractString)
fn = abspath(expanduser(fn))
# get the extension
local ext
try