fix issue with filenames with no directory causing error

pull/170/head v1.4.4
Andrew Port 2021-11-26 18:34:58 -08:00
parent abd99f0846
commit 5037fac574
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import codecs
import os import os
VERSION = '1.4.3' VERSION = '1.4.4'
AUTHOR_NAME = 'Andy Port' AUTHOR_NAME = 'Andy Port'
AUTHOR_EMAIL = 'AndyAPort@gmail.com' AUTHOR_EMAIL = 'AndyAPort@gmail.com'
GITHUB = 'https://github.com/mathandy/svgpathtools' GITHUB = 'https://github.com/mathandy/svgpathtools'

View File

@ -217,7 +217,7 @@ def disvg(paths=None, colors=None, filename=None, stroke_widths=None,
dirname = os_path.abspath(os_path.dirname(filename)) dirname = os_path.abspath(os_path.dirname(filename))
if not os_path.exists(dirname): if not os_path.exists(dirname):
makedirs(dirname) makedirs(dirname)
# append time stamp to filename # append time stamp to filename
if timestamp: if timestamp:
fbname, fext = os_path.splitext(filename) fbname, fext = os_path.splitext(filename)