[units.wesnoth.org] catch empty picture names in add-ons

This commit is contained in:
Elias Pschernig 2017-05-06 15:15:17 -04:00
parent 1eca3736f6
commit 6a287f22c5

View file

@ -127,7 +127,7 @@ class ImageCollector:
cdir = os.path.normpath(options.config_dir + "/data/add-ons")
if ipath.startswith(cdir):
ipath = os.path.join(options.addons, ipath[len(cdir):].lstrip("/"))
if ipath and os.path.exists(ipath):
if ipath and os.path.exists(ipath) and not os.path.isdir(ipath):
if no_tc:
shutil.copy2(ipath, opath)
else: