Set the Finder info before the access permissions

Looks like setxattr() requires write access, so we need to set
the Finder info before we "lock" the file.
This commit is contained in:
Andy McFadden 2015-01-06 10:50:30 -08:00
parent e5b74c28f2
commit 137f209a3f
1 changed files with 4 additions and 3 deletions

View File

@ -1097,15 +1097,16 @@ NuError Nu_CloseOutputFile(NuArchive* pArchive, const NuRecord* pRecord,
err = Nu_SetFileDates(pArchive, pRecord, pathnameUNI);
BailError(err);
err = Nu_SetFileAccess(pArchive, pRecord, pathnameUNI);
BailError(err);
#if defined(MAC_LIKE)
/* could also do this earlier and pass the fd for fsetxattr */
/* NOTE: must do this before Nu_SetFileAccess */
err = Nu_SetFinderInfo(pArchive, pRecord, pathnameUNI);
BailError(err);
#endif
err = Nu_SetFileAccess(pArchive, pRecord, pathnameUNI);
BailError(err);
bail:
return kNuErrNone;
}