Use a single dot for the extension
This commit is contained in:
parent
05b4db8ce3
commit
1d0638b048
2 changed files with 2 additions and 2 deletions
|
@ -108,7 +108,7 @@ class ImageCollector:
|
||||||
encoded_dir_name = base64url.encode_str(os.path.dirname(vpath))
|
encoded_dir_name = base64url.encode_str(os.path.dirname(vpath))
|
||||||
sanitized_file_name = re.sub(r'[^a-zA-Z0-9_.-]' , "", ".".join(os.path.basename(vpath).split("(")[0].split(".")[-2:]))
|
sanitized_file_name = re.sub(r'[^a-zA-Z0-9_.-]' , "", ".".join(os.path.basename(vpath).split("(")[0].split(".")[-2:]))
|
||||||
head, ext = os.path.splitext(sanitized_file_name)
|
head, ext = os.path.splitext(sanitized_file_name)
|
||||||
return '%s..%s.%s' % (head, encoded_dir_name, ext)
|
return '%s..%s%s' % (head, encoded_dir_name, ext)
|
||||||
|
|
||||||
if ipath:
|
if ipath:
|
||||||
id_name = make_name(ipath, self.hide_paths)
|
id_name = make_name(ipath, self.hide_paths)
|
||||||
|
|
|
@ -1199,7 +1199,7 @@ class HTMLOutput:
|
||||||
error_message("Error: No attack icon '%s' found for '%s'.\n" % (
|
error_message("Error: No attack icon '%s' found for '%s'.\n" % (
|
||||||
icon, uid))
|
icon, uid))
|
||||||
# core/images/units/elves-wood/shaman.png
|
# core/images/units/elves-wood/shaman.png
|
||||||
icon = os.path.join(PICS_LOCATION, "shaman..Y29yZS9pbWFnZXMvdW5pdHMvZWx2ZXMtd29vZA..png")
|
icon = os.path.join(PICS_LOCATION, "shaman..Y29yZS9pbWFnZXMvdW5pdHMvZWx2ZXMtd29vZA.png")
|
||||||
else:
|
else:
|
||||||
icon = os.path.join(PICS_LOCATION, image_add.id_name)
|
icon = os.path.join(PICS_LOCATION, image_add.id_name)
|
||||||
write('<td><img src="%s" alt="(image)"/></td>' % cleanurl(icon))
|
write('<td><img src="%s" alt="(image)"/></td>' % cleanurl(icon))
|
||||||
|
|
Loading…
Add table
Reference in a new issue