fix bug when there are dots in the file name

This commit is contained in:
Miao Xiang
2023-04-16 14:10:35 -07:00
parent 54e755528f
commit 0587f6c5c6
+2 -1
View File
@@ -333,7 +333,8 @@ def setup_ui(ui, gallery):
# write description to a file
def save_description(filename,descrip):
filename = filename.split('.')[0]+".description.txt"
lastDotIndex = filename.rindex('.')
filename = filename[0:lastDotIndex]+".description.txt"
if descrip != "":
try:
f = open(filename,'w')