Skip to content

Commit

Permalink
BUG Check if overlays file exists before unlinking. (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
cchen23 authored Feb 19, 2022
1 parent faa1cef commit 6869228
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cortex/freesurfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ def import_flat(fs_subject, patch, hemis=['lh', 'rh'], cx_subject=None,
database.db.clear_cache(cx_subject)
# Remove overlays.svg file (FLATMAPS HAVE CHANGED)
overlays_file = database.db.get_paths(cx_subject)['overlays']
os.unlink(overlays_file)
if os.path.exists(overlays_file):
os.unlink(overlays_file)
# Regenerate it?


Expand Down

0 comments on commit 6869228

Please sign in to comment.