Explorar o código

* WASI: workaround for FindFirst/FindNext opening the current directory, by using its full name

Nikolay Nikolov hai 7 meses
pai
achega
7e89495a09
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      rtl/wasi/wasiutil.pp

+ 3 - 0
rtl/wasi/wasiutil.pp

@@ -294,6 +294,9 @@ Begin
          DirName:=Copy(f.SearchSpec,1,f.NamePos);
         if ConvertToFdRelativePath(DirName,fd,pr)=0 then
          begin
+           { WasmTime doesn't like opening an empty path }
+           if pr='' then
+             pr:='.';
            repeat
              res:=__wasi_path_open(fd,
                                    0,