From 9d52e278a973b26d4ea95451327fd4c80310afed Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Tue, 24 Aug 2021 08:22:39 -0400 Subject: When titan uploads come in, existing files are first deleted. --- captain/response.f90 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/captain/response.f90 b/captain/response.f90 index 8934e4e..2659c31 100644 --- a/captain/response.f90 +++ b/captain/response.f90 @@ -583,12 +583,19 @@ contains integer(kind=8)::bytes_to_go integer::istat - logical::success + logical::success, file_exists !character(128)::msg success = .false. + ! Writing to an existing file has been broken for some reason... + inquire(file=filename, exist=file_exists) + if(file_exists) then + ! GNU Extension, boo... + call unlink(filename) + end if + open(newunit=unum, file=filename, status="unknown", & action="write", access='stream', iostat=istat) -- cgit v1.2.3