File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2287,10 +2287,12 @@ def save_labscripts(hdf5_file):
22872287 continue
22882288 hdf5_file .create_dataset (save_path , data = open (path ).read ())
22892289 with _vcs_cache_rlock :
2290- if path not in _vcs_cache :
2291- # Add file to watch list and create its entry in the cache.
2292- _file_watcher .add_file (path )
2293- _file_watcher_callback (path , None , None )
2290+ already_cached = path in _vcs_cache
2291+ if not already_cached :
2292+ # Add file to watch list and create its entry in the cache.
2293+ _file_watcher .add_file (path )
2294+ _file_watcher_callback (path , None , None )
2295+ with _vcs_cache_rlock :
22942296 # Save the cached vcs output to the file.
22952297 for command , info , err in _vcs_cache [path ]:
22962298 attribute_str = command [0 ] + ' ' + command [1 ]
You can’t perform that action at this time.
0 commit comments