From 5619feb6c0a918906322aa45b2a71504ad40cb4c Mon Sep 17 00:00:00 2001 From: JackDevine Date: Tue, 6 Aug 2019 20:40:09 +1200 Subject: [PATCH] Expand paths beginning with ~ on unix systems. --- src/animation.jl | 2 +- src/output.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/animation.jl b/src/animation.jl index b6d45f36..828cdb47 100644 --- a/src/animation.jl +++ b/src/animation.jl @@ -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 diff --git a/src/output.jl b/src/output.jl index 95a9c158..bbc7b80e 100644 --- a/src/output.jl +++ b/src/output.jl @@ -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