From ab18d269314c29aa12b61ee1914e41b3f4b4c407 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 20 Apr 2023 10:03:52 +0200 Subject: Revert "Refuse to overwrite an existing stream" This was intended to help users avoid accidents. However, it seems to trip people up a lot, and creates problems such as breaking Slurm job pre-emption (re-scheduled job fails because output already exists). This reverts commit 6db9619ba5172b9e416a5939d375f5119aa652ff. --- libcrystfel/src/stream.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index 5fb6b9fa..f58ff05e 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -1176,11 +1176,6 @@ Stream *stream_open_for_write(const char *filename, st->dtempl_write = dtempl; st->dtempl_read = NULL; - if ( file_exists(filename) ) { - ERROR("Refusing to overwrite stream '%s'!\n", filename); - return NULL; - } - st->fh = fopen(filename, "w"); if ( st->fh == NULL ) { ERROR("Failed to open stream.\n"); -- cgit v1.2.3