File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments