PBGetCatInfo uses fs spec / dirID

This commit is contained in:
Kelvin Sherlock 2015-01-05 12:33:29 -05:00
parent 183078925e
commit 24e47c7f9b

View File

@ -52,6 +52,7 @@
#include "os_internal.h" #include "os_internal.h"
#include "toolbox.h" #include "toolbox.h"
#include "stackframe.h" #include "stackframe.h"
#include "fs_spec.h"
using ToolBox::Log; using ToolBox::Log;
@ -187,9 +188,16 @@ namespace OS {
} }
sname = ToolBox::ReadPString(ioNamePtr, true); sname = ToolBox::ReadPString(ioNamePtr, true);
{
uint32_t ioDirID = memoryReadLong(parm + _ioDirID);
sname = FSSpecManager::ExpandPath(sname, ioDirID);
}
Log(" PBGetCatInfo(%s)\n", sname.c_str()); Log(" PBGetCatInfo(%s)\n", sname.c_str());
struct stat st; struct stat st;
if (::stat(sname.c_str(), &st) < 0) if (::stat(sname.c_str(), &st) < 0)
@ -341,6 +349,10 @@ namespace OS {
} }
std::string sname = ToolBox::ReadPString(ioNamePtr, true); std::string sname = ToolBox::ReadPString(ioNamePtr, true);
{
uint32_t ioDirID = memoryReadLong(parm + _ioDirID);
sname = FSSpecManager::ExpandPath(sname, ioDirID);
}
Log(" PBSetCatInfo(%s)\n", sname.c_str()); Log(" PBSetCatInfo(%s)\n", sname.c_str());