소스 검색

* use AllowDirectorySeparators, instead of checking for '/' and '\'

Nikolay Nikolov 4 년 전
부모
커밋
a0e7882692
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      rtl/wasi/system.pp

+ 1 - 1
rtl/wasi/system.pp

@@ -156,7 +156,7 @@ begin
     if Copy(path,1,Length(pdir))<>pdir then
       continue;
     chridx:=Length(pdir)+1;
-    if ((pdir<>'/') and (pdir<>'\')) and
+    if ((Length(pdir)<>1) or ((Length(pdir)=1) and not (pdir[1] in AllowDirectorySeparators))) and
        ((chridx>Length(path)) or not (path[chridx] in AllowDirectorySeparators)) then
       continue;
     if Length(pdir)>longest_match then