diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-06-03 09:39:32 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-06-03 09:39:32 -0400 |
commit | dd1ac41b1846e4cfbd1823af5b4503f1dc0d353c (patch) | |
tree | bd3507c189bea76a0636315ae02605174a4e4509 | |
parent | 9fc8fe737ccacf4ee86efd1424fae3b0802331d3 (diff) | |
download | levitating-dd1ac41b1846e4cfbd1823af5b4503f1dc0d353c.tar.gz levitating-dd1ac41b1846e4cfbd1823af5b4503f1dc0d353c.zip |
Glob dir listings are now checked for directory separators prior to prepending the directory
-rw-r--r-- | player/tasks.f90 | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/player/tasks.f90 b/player/tasks.f90 index b0c881e..e0eecfd 100644 --- a/player/tasks.f90 +++ b/player/tasks.f90 @@ -120,7 +120,14 @@ contains allocate(statuses(size(files))) do i = 1, size(files) - call combine_paths(dir, files(i), fullname) + + ! On some systems, we're getting subdirectories back... + if(index(files(i), '/') + index(files(i), '\') > 0) then + fullname = files(i) + else + call combine_paths(dir, files(i), fullname) + end if + statuses(i) = upload(url, fullname) end do @@ -157,10 +164,13 @@ contains ! If we're here, we have a single filename to upload inquire(file=source_filename, size=file_size, exist=file_exists) if((.not. file_exists) .or. (file_size == 0)) then + Print *, "File does not exist or size is 0: "//trim(source_filename), file_size res = .false. return end if + Print *, "Opening for upload: "//trim(source_filename) + open(newunit=unit_number, file=trim(source_filename), status='UNKNOWN', & access='STREAM', form='UNFORMATTED', iostat=istatus) |