mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-22 00:32:44 +00:00
fix GetFileInfo (finder info overwritten)
This commit is contained in:
parent
1f9b10a59e
commit
475cbc47eb
@ -196,8 +196,11 @@ namespace OS
|
||||
{
|
||||
uint8_t buffer[32];
|
||||
std::memset(buffer, 0, sizeof(buffer));
|
||||
int rv;
|
||||
int xerrno;
|
||||
|
||||
::getxattr(sname.c_str(), XATTR_FINDERINFO_NAME, buffer, 32, 0, 0);
|
||||
rv = ::getxattr(sname.c_str(), XATTR_FINDERINFO_NAME, buffer, 32, 0, 0);
|
||||
xerrno = errno;
|
||||
|
||||
// only 16 bytes copied.
|
||||
std::memcpy(memoryPointer(parm + 32), buffer, 16);
|
||||
@ -208,9 +211,9 @@ namespace OS
|
||||
// file reference number
|
||||
memoryWriteWord(0, parm + 24);
|
||||
// file attributes
|
||||
memoryWriteWord(0, parm + 30);
|
||||
memoryWriteByte(0, parm + 30);
|
||||
// version (unused)
|
||||
memoryWriteWord(0, parm + 32);
|
||||
memoryWriteByte(0, parm + 31);
|
||||
|
||||
// file id
|
||||
memoryWriteLong(0, parm + 48);
|
||||
|
Loading…
Reference in New Issue
Block a user