aboutsummaryrefslogtreecommitdiff
path: root/player
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-05-19 08:52:46 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-05-19 08:52:46 -0400
commit62f40d2d4cb8cd53d57a251404e90f9c4b2d4d31 (patch)
tree59609ad71f9f5c1ffa0e85c834d578393de45d10 /player
parent40c9cf38ca70f2d5b8418b5e2fdda78ab3707844 (diff)
downloadlevitating-62f40d2d4cb8cd53d57a251404e90f9c4b2d4d31.tar.gz
levitating-62f40d2d4cb8cd53d57a251404e90f9c4b2d4d31.zip
Report failure for uploading non-existant or 0byte files.
Diffstat (limited to 'player')
-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)