mirror of
https://github.com/aaru-dps/fstester.git
synced 2025-12-16 19:24:39 +00:00
Change directory creation API call for MacOS.
This commit is contained in:
@@ -101,7 +101,8 @@ void ResourceFork(const char* path)
|
||||
FInfo finderInfo;
|
||||
int32_t count;
|
||||
HFileInfo* fpb;
|
||||
CInfoPBRec cipbr;
|
||||
CInfoPBRec cipbr;
|
||||
HParamBlockRec dirPB;
|
||||
|
||||
snprintf((char*)str255, 255, "%s", path);
|
||||
hpb.ioNamePtr = str255;
|
||||
@@ -115,13 +116,23 @@ void ResourceFork(const char* path)
|
||||
}
|
||||
refNum = hpb.ioVRefNum;
|
||||
|
||||
rc = DirCreate(refNum, fsRtDirID, (unsigned char*)"\pRSRC", &dirId);
|
||||
memset(&dirPB, 0, sizeof(HParamBlockRec));
|
||||
|
||||
dirPB.fileParam.ioCompletion = 0; // Nothing, sync
|
||||
dirPB.fileParam.ioVRefNum = refNum; // Volume specification
|
||||
dirPB.fileParam.ioNamePtr = (StringPtr) "\pRSRC"; // Directory name to create
|
||||
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
||||
|
||||
rc = PBDirCreate(&dirPB, 0);
|
||||
|
||||
if(rc)
|
||||
{
|
||||
printf("Error %d creating working directory.\n", rc);
|
||||
return;
|
||||
}
|
||||
|
||||
dirId = dirPB.fileParam.ioDirID;
|
||||
|
||||
printf("Creating resource forks.\n");
|
||||
|
||||
memset(&finderInfo, 0, sizeof(FInfo));
|
||||
|
||||
Reference in New Issue
Block a user