fix issue with filenames with no directory causing error
parent
8ad7458b31
commit
d1421d6286
|
@ -217,7 +217,7 @@ def disvg(paths=None, colors=None, filename=None, stroke_widths=None,
|
||||||
# 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)
|
||||||
dirname = os_path.dirname(filename)
|
dirname = os_path.abspath(os_path.dirname(filename))
|
||||||
tstamp = str(time()).replace('.', '')
|
tstamp = str(time()).replace('.', '')
|
||||||
stfilename = os_path.split(fbname)[1] + '_' + tstamp + fext
|
stfilename = os_path.split(fbname)[1] + '_' + tstamp + fext
|
||||||
filename = os_path.join(dirname, stfilename)
|
filename = os_path.join(dirname, stfilename)
|
||||||
|
|
Loading…
Reference in New Issue