aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--player/tasks.f907
1 files changed, 6 insertions, 1 deletions
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)