diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-05-19 08:52:46 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-05-19 08:52:46 -0400 |
commit | 62f40d2d4cb8cd53d57a251404e90f9c4b2d4d31 (patch) | |
tree | 59609ad71f9f5c1ffa0e85c834d578393de45d10 | |
parent | 40c9cf38ca70f2d5b8418b5e2fdda78ab3707844 (diff) | |
download | levitating-62f40d2d4cb8cd53d57a251404e90f9c4b2d4d31.tar.gz levitating-62f40d2d4cb8cd53d57a251404e90f9c4b2d4d31.zip |
Report failure for uploading non-existant or 0byte files.
-rw-r--r-- | player/tasks.f90 | 7 |
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) |