From dd1ac41b1846e4cfbd1823af5b4503f1dc0d353c Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Thu, 3 Jun 2021 09:39:32 -0400 Subject: Glob dir listings are now checked for directory separators prior to prepending the directory --- player/tasks.f90 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'player') 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) -- cgit v1.2.3