From d1421d62865faab88e25ce9157cf2bbdc03944d0 Mon Sep 17 00:00:00 2001 From: Andrew Port Date: Fri, 26 Nov 2021 18:23:07 -0800 Subject: [PATCH] fix issue with filenames with no directory causing error --- svgpathtools/paths2svg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svgpathtools/paths2svg.py b/svgpathtools/paths2svg.py index f9c461f..8a88f0a 100644 --- a/svgpathtools/paths2svg.py +++ b/svgpathtools/paths2svg.py @@ -217,7 +217,7 @@ def disvg(paths=None, colors=None, filename=None, stroke_widths=None, # append time stamp to filename if timestamp: fbname, fext = os_path.splitext(filename) - dirname = os_path.dirname(filename) + dirname = os_path.abspath(os_path.dirname(filename)) tstamp = str(time()).replace('.', '') stfilename = os_path.split(fbname)[1] + '_' + tstamp + fext filename = os_path.join(dirname, stfilename)