aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--captain/response.f909
1 files changed, 8 insertions, 1 deletions
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)