File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -356,9 +356,12 @@ def copy_assets_to_output(self) -> None:
356356 or src_st .st_mtime > dst_st .st_mtime
357357 or src_st .st_size != dst_st .st_size
358358 ):
359- shutil .copy2 (src_file , dst_file )
360359 if ext == ".synctex.gz" :
360+ unhide_file (dst_file )
361+ shutil .copy2 (src_file , dst_file )
361362 hide_file (dst_file )
363+ else :
364+ shutil .copy2 (src_file , dst_file )
362365 logger .debug (f"Updated { dst_file } " )
363366
364367
@@ -368,3 +371,13 @@ def hide_file(file_name):
368371 ret = ctypes .windll .kernel32 .SetFileAttributesW (file_name , FILE_ATTRIBUTE_HIDDEN )
369372 if not ret : # There was an error.
370373 raise ctypes .WinError ()
374+
375+
376+ def unhide_file (file_name ):
377+ if os .name == "nt" :
378+ FILE_ATTRIBUTE_HIDDEN = 0x02
379+ attr = ctypes .windll .kernel32 .GetFileAttributesW (file_name )
380+ attr &= ~ FILE_ATTRIBUTE_HIDDEN
381+ ret = ctypes .windll .kernel32 .SetFileAttributesW (file_name , attr )
382+ if not ret : # There was an error.
383+ raise ctypes .WinError ()
You can’t perform that action at this time.
0 commit comments