hi,
i found the way to open a temp file is different from other files (.db files
or journal files)
open temp file: open with the relative path. and then point to the fullpath
while open other files: get the fullpath first, and then open.
codes are cited as below:
in pager.c
sqlite3pager_open()
if( zFilename && zFilename[0] ){
{
* zFullPathname = sqlite3OsFullPathname(zFilename);
* if( zFullPathname ){
* rc = sqlite3OsOpenReadWrite(zFullPathname, &fd, &readOnly);
* }
}
}else{
* rc = sqlite3pager_opentemp(zTemp, &fd);
* zFilename = zTemp;
* zFullPathname = sqlite3OsFullPathname(zFilename);
* if( rc==SQLITE_OK ){
tempFile = 1;
}
can anyone explain what is the concern here? this disorder affected my
porting layer.
thanks
wang