Skip to content

Commit c25fc12

Browse files
author
xxx
committed
tooltip, better filename
1 parent 6db710d commit c25fc12

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def safe_filename(text, max_length = 64):
274274
text = text.encode("ascii", "ignore").decode("ascii")
275275
text = re_sub(r'[<>:"/\\|?*\x00-\x1F]', "_", text)
276276
text = re_sub(r"\s+", "_", text)
277-
text = text.replace('__','_').replace('__','_').replace('__','_')
277+
text = text.replace('__','_').replace('__','_').replace('__','_').strip("_")
278278
text = text.strip(" .")
279279
name, *rest = text.split(".")
280280
if name.upper() in WINDOWS_RESERVED_NAMES:
@@ -1263,6 +1263,8 @@ def prepare_info(self):
12631263
info_list.append('')
12641264
info_list.append(f'creation host : {self_header.creation_host} ({self_header.creation_os})')
12651265
info_list.append(f'creation time : {local_time}')
1266+
info_list.append(f'file name : {file_name}')
1267+
12661268
info_list_med.append(f'creation time : {local_time}')
12671269

12681270
self.txtinfo_short = '\n'.join(info_list)

0 commit comments

Comments
 (0)