From 24e47c7f9b464eafa067e09c7acd044bd7aa321c Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Mon, 5 Jan 2015 12:33:29 -0500 Subject: [PATCH] PBGetCatInfo uses fs spec / dirID --- toolbox/os_hfs_dispatch.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/toolbox/os_hfs_dispatch.cpp b/toolbox/os_hfs_dispatch.cpp index 8a45c4b..65dfe9b 100644 --- a/toolbox/os_hfs_dispatch.cpp +++ b/toolbox/os_hfs_dispatch.cpp @@ -52,7 +52,8 @@ #include "os_internal.h" #include "toolbox.h" #include "stackframe.h" - +#include "fs_spec.h" + using ToolBox::Log; using MacOS::macos_error_from_errno; @@ -187,9 +188,16 @@ namespace OS { } sname = ToolBox::ReadPString(ioNamePtr, true); + { + uint32_t ioDirID = memoryReadLong(parm + _ioDirID); + sname = FSSpecManager::ExpandPath(sname, ioDirID); + } Log(" PBGetCatInfo(%s)\n", sname.c_str()); + + + struct stat st; if (::stat(sname.c_str(), &st) < 0) @@ -341,6 +349,10 @@ namespace OS { } 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());