Skip to content

Commit 1467d07

Browse files
committed
fix: only set_readonly if outname exists
1 parent fc5f5b2 commit 1467d07

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

heudiconv/convert.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,11 @@ def convert(items, converter, scaninfo_suffix, custom_callable, with_prov,
250250
if op.exists(scaninfo):
251251
lgr.info("Post-treating %s file", scaninfo)
252252
treat_infofile(scaninfo)
253-
set_readonly(outname)
253+
254+
# this may not always be the case: ex. fieldmap1, fieldmap2
255+
# will address after refactor
256+
if op.exists(outname):
257+
set_readonly(outname)
254258

255259
if custom_callable is not None:
256260
custom_callable(*item)

0 commit comments

Comments
 (0)