aboutsummaryrefslogtreecommitdiff
path: root/captain
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-08-24 08:22:39 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-08-24 08:22:39 -0400
commit9d52e278a973b26d4ea95451327fd4c80310afed (patch)
tree6c796a8a71d805ff710c5b79e9649facd70833df /captain
parentb45b2dd73587abeeb0351bf35a2b20d6afddff24 (diff)
downloadlevitating-9d52e278a973b26d4ea95451327fd4c80310afed.tar.gz
levitating-9d52e278a973b26d4ea95451327fd4c80310afed.zip
When titan uploads come in, existing files are first deleted.
Diffstat (limited to 'captain')
-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)