Morgan
04-19-2002, 09:35 AM
Let's assume that "mgr" is a valid IFileMgr*
IFile* file = IFILEMGR_OpenFile( mgr, "foo", _OFM_CREATE );
if (file) {
FileInfo info;
int result = IFILE_GetInfo( file, &info );
// If we're here then 'result' must be equal to 'SUCCESS' ... and it is.
if (result == SUCCESS) {
result = IFILEMGR_Test( mgr, info.szName );
// But, if you thought 'result' would be equal to 'SUCCESS' at
// this point you'd be wrong, the file we just created is now
// considered not to exist.
// The reason, as far as I can tell, is that info.szName is the
// full pathname of the file.
}
}
This might not be a problem, except some calls (e.g., ISHELL_BrowseFile()) don't take an IFile*, they want the filename, and if that filename is obtained via an IFILE_GetInfo call then there is some, shall we say, unexpected behavior (and gnashing of teeth).
Now I've only been able to verify this on the emulator, perhaps this isn't a problem on a device ... would anyone happen to know?
btw, is there a way/method to report bugs, whether they be with the emulator or on a device?
IFile* file = IFILEMGR_OpenFile( mgr, "foo", _OFM_CREATE );
if (file) {
FileInfo info;
int result = IFILE_GetInfo( file, &info );
// If we're here then 'result' must be equal to 'SUCCESS' ... and it is.
if (result == SUCCESS) {
result = IFILEMGR_Test( mgr, info.szName );
// But, if you thought 'result' would be equal to 'SUCCESS' at
// this point you'd be wrong, the file we just created is now
// considered not to exist.
// The reason, as far as I can tell, is that info.szName is the
// full pathname of the file.
}
}
This might not be a problem, except some calls (e.g., ISHELL_BrowseFile()) don't take an IFile*, they want the filename, and if that filename is obtained via an IFILE_GetInfo call then there is some, shall we say, unexpected behavior (and gnashing of teeth).
Now I've only been able to verify this on the emulator, perhaps this isn't a problem on a device ... would anyone happen to know?
btw, is there a way/method to report bugs, whether they be with the emulator or on a device?