From 4a2f81c205df8e6e2a90f41e19c552d35cf54ce1 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Tue, 25 May 2021 07:49:38 -0400 Subject: Added directory to filename for upload when mask is specified. --- player/tasks.f90 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'player') diff --git a/player/tasks.f90 b/player/tasks.f90 index 278a0d0..b0c881e 100644 --- a/player/tasks.f90 +++ b/player/tasks.f90 @@ -102,6 +102,7 @@ contains character(DIR_LIST_STRING_LENGTH), dimension(:), pointer::files logical, dimension(:), allocatable::statuses integer::i + character(len=:), allocatable::dir, fullname ! We can cheat by using the get_files_in_directory function since it ! is merely calling ls/dir, which will resolve the glob @@ -113,15 +114,22 @@ contains if(associated(files)) then + allocate(character(len=len_trim(mask)) :: dir) + allocate(character(len=len_trim(mask)+DIR_LIST_STRING_LENGTH+1) :: fullname) + call path_from_file(mask, dir) + allocate(statuses(size(files))) do i = 1, size(files) - statuses(i) = upload(url, files(i)) + call combine_paths(dir, files(i), fullname) + statuses(i) = upload(url, fullname) end do res = all(statuses) deallocate(statuses) deallocate(files) + deallocate(dir) + deallocate(fullname) else -- cgit v1.2.3