Skip to content

Commit 665ed01

Browse files
authored
update fortran-yaml (fabm-model#63)
* update fortran-yaml * update fortran-yaml
1 parent 693c74f commit 665ed01

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/yaml/yaml_settings.F90

+7-2
Original file line numberDiff line numberDiff line change
@@ -299,17 +299,22 @@ integer function value_get_yaml_style(self, display)
299299
value_get_yaml_style = -1
300300
end function
301301

302-
function get_path(self) result(path)
302+
function get_path(self, include_file) result(path)
303303
class (type_value), target, intent(in) :: self
304+
logical, optional, intent(in) :: include_file
304305
character(len=:), allocatable :: path
305306

307+
logical :: include_file_
306308
class (type_value), pointer :: value
307309
character(len=8) :: strindex
308310

311+
include_file_ = .true.
312+
if (present(include_file)) include_file_ = include_file
313+
309314
path = ''
310315
value => self
311316
do while (associated(value))
312-
if (allocated(value%path)) then
317+
if (allocated(value%path) .and. include_file_) then
313318
if (len(value%path) > 0) then
314319
path = value%path // ':' // path
315320
return

0 commit comments

Comments
 (0)