parse root fix

This commit is contained in:
Pavel 2023-01-24 11:41:19 +03:00
parent 85e8e21a5c
commit 11551a1816
3 changed files with 23 additions and 6 deletions

View File

@ -122,7 +122,15 @@ begin
Case Result of
PT_ROOT:
begin
Result:=_sys_root_open(rp,flags,mode);
if (rp='') then
begin
//root dir
Result:=_sys_root_dir_open(rp,flags,mode);
end else
begin
//root file
Exit(-ENOENT);
end;
end;
PT_FILE:
begin
@ -613,7 +621,15 @@ begin
Case Result of
PT_ROOT:
begin
Result:=_sys_root_stat(rp,stat);
if (rp='') then
begin
//root dir
Result:=_sys_root_dir_stat(rp,stat);
end else
begin
//root file
Exit(ENOENT);
end;
end;
PT_FILE:
begin

View File

@ -42,8 +42,8 @@ type
function _sys_dir_open(const path:RawByteString;flags,mode:Integer):Integer;
function _sys_dir_stat(Const path:RawByteString;stat:PSceKernelStat):Integer;
function _sys_root_open(const path:RawByteString;flags,mode:Integer):Integer;
function _sys_root_stat(Const path:RawByteString;stat:PSceKernelStat):Integer;
function _sys_root_dir_open(const path:RawByteString;flags,mode:Integer):Integer;
function _sys_root_dir_stat(Const path:RawByteString;stat:PSceKernelStat):Integer;
implementation
@ -254,7 +254,7 @@ end;
//
function _sys_root_open(const path:RawByteString;flags,mode:Integer):Integer;
function _sys_root_dir_open(const path:RawByteString;flags,mode:Integer):Integer;
var
f:TDirFile;
@ -279,7 +279,7 @@ begin
end;
end;
function _sys_root_stat(Const path:RawByteString;stat:PSceKernelStat):Integer;
function _sys_root_dir_stat(Const path:RawByteString;stat:PSceKernelStat):Integer;
begin
stat^:=Default(SceKernelStat);

View File

@ -683,6 +683,7 @@ begin
begin
if (fp^=#0) then //root???
begin
r:=pp;
Result:=PT_ROOT;
end else
begin