Merge pull request #189 from ryandesign/minivmac-copy-attrs

MiniVMac.cc: Preserve attributes when copying
This commit is contained in:
Wolfgang Thaller 2022-10-25 23:27:07 +02:00 committed by GitHub
commit 2d38cceb19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -460,6 +460,8 @@ void MiniVMacLauncher::CopySystemFile(const std::string &fn, bool required)
hfs_setfork(out, 1);
hfs_read(in, buffer.data(), fileent.u.file.rsize);
hfs_write(out, buffer.data(), fileent.u.file.rsize);
fileent.fdflags &= ~HFS_FNDR_HASBEENINITED;
hfs_fsetattr(out, &fileent);
hfs_close(in);
hfs_close(out);
}