From b6ffad8161ac358644d141e5ba74c90d62d5d26f Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Wed, 8 Jan 2025 15:10:26 -0500 Subject: Fixed directory listing when directory contains a space --- common/utilities.F90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/utilities.F90 b/common/utilities.F90 index c091c6e..3b51ac9 100644 --- a/common/utilities.F90 +++ b/common/utilities.F90 @@ -391,10 +391,10 @@ contains res => null() #ifdef WINDOWS - call execute_command_line("dir /b/ad-h"//trim(directory)//" > "//trim(tempfile), & + call execute_command_line('dir /b/ad-h "'//trim(directory)//" > "//trim(tempfile), & wait=.true.) #else - call execute_command_line("ls -l "//trim(directory)//" > "//trim(tempfile), & + call execute_command_line('ls -l "'//trim(directory)//'" > '//trim(tempfile), & wait=.true.) #endif @@ -430,7 +430,7 @@ contains ! Windows is all set, don't call anything #ifndef WINDOWS ! Now call ls, but group directories first - call execute_command_line("ls --group-directories-first "//trim(directory)//" > "//trim(tempfile), & + call execute_command_line('ls --group-directories-first "'//trim(directory)//'" > '//trim(tempfile), & wait=.true.) #endif @@ -469,10 +469,10 @@ contains skip_first = .FALSE. #ifdef WINDOWS - call execute_command_line("dir /b/a-d-h "//trim(directory)//" > "//trim(tempfile), & + call execute_command_line('dir /b/a-d-h "'//trim(directory)//'" > '//trim(tempfile), & wait=.true.) #else - call execute_command_line("ls -l "//trim(directory)//" > "//trim(tempfile), & + call execute_command_line('ls -l "'//trim(directory)//'" > '//trim(tempfile), & wait=.true.) #endif @@ -500,7 +500,7 @@ contains n = count(is_real_file) close(unum) - call execute_command_line("ls "//trim(directory)//" > "//trim(tempfile), & + call execute_command_line('ls "'//trim(directory)//'" > '//trim(tempfile), & wait=.true.) open(newunit=unum, file=tempfile, action='read') -- cgit v1.2.3