aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-04-20 10:03:52 +0200
committerThomas White <taw@physics.org>2023-04-20 10:03:52 +0200
commitab18d269314c29aa12b61ee1914e41b3f4b4c407 (patch)
treec580187d220a42b84933f09ea31b637d53cce00a
parentfcffbf23484f1227b3732d9e5b587d431a91e4d3 (diff)
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.
-rw-r--r--libcrystfel/src/stream.c5
1 files changed, 0 insertions, 5 deletions
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");