Skip to content

Commit 0078157

Browse files
authored
Merge pull request #1269 from EmmaRenauld/fix_issue_1264
Prevent input=output in tractogram compress
2 parents 33c01d9 + 05221ee commit 0078157

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/scilpy/cli/scil_tractogram_compress.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ def main():
4747
args = parser.parse_args()
4848
logging.getLogger().setLevel(logging.getLevelName(args.verbose))
4949

50+
if args.in_tractogram == args.out_tractogram:
51+
parser.error("This script does not allow using the same input and "
52+
"output tractogram files, even with option -f. It uses "
53+
"lazy loading which does not allow this option.")
5054
assert_inputs_exist(parser, args.in_tractogram)
5155
assert_outputs_exist(parser, args, args.out_tractogram)
5256
check_tracts_same_format(parser, args.in_tractogram, args.out_tractogram)

0 commit comments

Comments
 (0)