mirror of https://github.com/red-prig/fpPS4.git
parse root fix
This commit is contained in:
parent
85e8e21a5c
commit
11551a1816
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -683,6 +683,7 @@ begin
|
|||
begin
|
||||
if (fp^=#0) then //root???
|
||||
begin
|
||||
r:=pp;
|
||||
Result:=PT_ROOT;
|
||||
end else
|
||||
begin
|
||||
|
|
Loading…
Reference in New Issue