From 62f40d2d4cb8cd53d57a251404e90f9c4b2d4d31 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Wed, 19 May 2021 08:52:46 -0400 Subject: Report failure for uploading non-existant or 0byte files. --- player/tasks.f90 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/player/tasks.f90 b/player/tasks.f90 index cbd4973..278a0d0 100644 --- a/player/tasks.f90 +++ b/player/tasks.f90 @@ -144,9 +144,14 @@ contains integer(kind=8)::file_size integer::unit_number, istatus, url_length, i + logical::file_exists ! If we're here, we have a single filename to upload - inquire(file=source_filename, size=file_size) + inquire(file=source_filename, size=file_size, exist=file_exists) + if((.not. file_exists) .or. (file_size == 0)) then + res = .false. + return + end if open(newunit=unit_number, file=trim(source_filename), status='UNKNOWN', & access='STREAM', form='UNFORMATTED', iostat=istatus) -- cgit v1.2.3