From 31c4414c32836e5fb658a9fe32b33a7a55e70daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bl=C3=A5b=C3=A4ck?= Date: Wed, 6 Nov 2019 15:17:51 +0100 Subject: [PATCH] animation.jl: using randstring() to generate unique tmp names (fix: 2239) Browser caching prevents animations from being updated if names are not unique. This solves Issue #2239. --- src/animation.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/animation.jl b/src/animation.jl index b78b02b5..d05c92e3 100644 --- a/src/animation.jl +++ b/src/animation.jl @@ -21,9 +21,9 @@ function frame(anim::Animation, plt::P=current()) where P<:AbstractPlot push!(anim.frames, filename) end -giffn() = (isijulia() ? "tmp.gif" : tempname()*".gif") -movfn() = (isijulia() ? "tmp.mov" : tempname()*".mov") -mp4fn() = (isijulia() ? "tmp.mp4" : tempname()*".mp4") +giffn() = (isijulia() ? "tmp_"*randstring()*".gif" : tempname()*".gif") +movfn() = (isijulia() ? "tmp_"*randstring()*".mov" : tempname()*".mov") +mp4fn() = (isijulia() ? "tmp_"*randstring()*".mp4" : tempname()*".mp4") mutable struct FrameIterator itr