In my QE editor and a few other programs, I simply make sure that new files are created without EAs.
More precisely, because libc creates these file permission EAs on a new file automatically, my save routines all have some logic to immediately delete them if the file was new. (I don't do that when updating an existing file because the user might actually have set them on purpose.)
e.g.
if ( !fileExists ) {
#ifdef __OS2__
// If this is a new file, get rid of the useless default EAs added by klibc
deleteEA( pszFileName, (PCSZ) "UID");
deleteEA( pszFileName, (PCSZ) "GID");
deleteEA( pszFileName, (PCSZ) "MODE");
deleteEA( pszFileName, (PCSZ) "INO");
deleteEA( pszFileName, (PCSZ) "RDEV");
deleteEA( pszFileName, (PCSZ) "GEN");
deleteEA( pszFileName, (PCSZ) "FLAGS");
#endif
}
unsigned long deleteEA( char *pszPathName, const char *pszEAName )
{
PFEA2LIST pFEA2List = NULL;
PFEA2 pFEA2 = NULL;
EAOP2 eaop2 = {0};
size_t cb = 0;
APIRET rc = ERROR_NOT_ENOUGH_MEMORY;
cb = sizeof( FEA2LIST ) + strlen( pszEAName );
pFEA2List = (PFEA2LIST) calloc( cb, 1 );
if ( pFEA2List ) {
pFEA2List->cbList = cb;
pFEA2 = pFEA2List->list;
pFEA2->cbName = (BYTE) strlen( pszEAName );
strcpy( pFEA2->szName, pszEAName );
pFEA2->cbValue = 0;
eaop2.fpFEA2List = pFEA2List;
rc = DosSetPathInfo( (PCSZ) pszPathName, FIL_QUERYEASIZE,
(PBYTE) &eaop2, sizeof( eaop2 ), DSPI_WRTTHRU );
free( pFEA2List );
}
return (unsigned long) rc;
}