small flaws
This commit is contained in:
parent
4d432e5462
commit
1a943df97e
|
@ -318,21 +318,20 @@ function rectifyPath(path)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
character(len=*) :: path
|
character(len=*) :: path
|
||||||
character(len=len_trim(path)) :: rectifyPath
|
character(len=1024) :: rectifyPath
|
||||||
integer :: i,j,k,l ! no pInt
|
integer :: i,j,k,l ! no pInt
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! remove /./ from path
|
! remove /./ from path
|
||||||
l = len_trim(path)
|
rectifyPath = trim(path)
|
||||||
rectifyPath = path
|
l = len_trim(rectifyPath)
|
||||||
do i = l,3,-1
|
do i = l,3,-1
|
||||||
if (rectifyPath(i-2:i) == '/./') rectifyPath(i-1:l) = rectifyPath(i+1:l)//' '
|
if (rectifyPath(i-2:i) == '/./') rectifyPath(i-1:l) = rectifyPath(i+1:l)//' '
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! remove // from path
|
! remove // from path
|
||||||
l = len_trim(path)
|
l = len_trim(rectifyPath)
|
||||||
rectifyPath = path
|
|
||||||
do i = l,2,-1
|
do i = l,2,-1
|
||||||
if (rectifyPath(i-1:i) == '//') rectifyPath(i-1:l) = rectifyPath(i:l)//' '
|
if (rectifyPath(i-1:i) == '//') rectifyPath(i-1:l) = rectifyPath(i:l)//' '
|
||||||
enddo
|
enddo
|
||||||
|
|
Loading…
Reference in New Issue