mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-05 04:30:38 +03:00
Remove delOnClose flag from os2File structure, use pathToDel==NULL for the same check. (CVS 5090)
FossilOrigin-Name: 02e123bb9b3da81bc8ee8bab7a2c54bbaadc5123
This commit is contained in:
14
manifest
14
manifest
@@ -1,5 +1,5 @@
|
||||
C Fix\sa\sbug\swhereby\sthe\sdatabase\sfile\swas\snot\salways\sbeing\sextended\sto\sits\soriginal\ssize\swhen\srolling\sback\san\sincremental-vacuum\soperation.\s(CVS\s5089)
|
||||
D 2008-05-06T18:13:26
|
||||
C Remove\sdelOnClose\sflag\sfrom\sos2File\sstructure,\suse\spathToDel==NULL\sfor\sthe\ssame\scheck.\s(CVS\s5090)
|
||||
D 2008-05-06T21:42:10
|
||||
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
|
||||
F Makefile.in 25b3282a4ac39388632c2fb0e044ff494d490952
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@@ -119,7 +119,7 @@ F src/mutex_w32.c 133698096a2c4e81cd11ea6f4de7891c66f7b9f7
|
||||
F src/os.c d811a3e1a152e03c98d3dd85f2b7aff0d7630cea
|
||||
F src/os.h 2ee8b0dec88f946c5371919ffa0f2fe4ac0de2e6
|
||||
F src/os_common.h e8b748b2f2ecc8a498e50bfe5d8721f189c19d2a
|
||||
F src/os_os2.c 41015b3fa91568761eb10cbf6ca27a0624ba0bda
|
||||
F src/os_os2.c a5b4cab0cab950b9a11a539a137cd80419f91ea3
|
||||
F src/os_unix.c a810e2aefdaddacf479407f76f8f4ca381d231b2
|
||||
F src/os_win.c 3a60bddd07ea6f8adb2314dd5996ac97b988f403
|
||||
F src/pager.c 22a5a810a3eadf8fe84c3de479def9c0dadc5ff8
|
||||
@@ -633,7 +633,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
||||
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
|
||||
P 729e2f06ba4030cc771fc876ddfd41866b8c0d93
|
||||
R 397af0a306f96b692c322e18ab9ae1dc
|
||||
U danielk1977
|
||||
Z 0d3268afef5fc245ffa4cec2f875eaa5
|
||||
P 4a1ae9d0320de1013a3b5f24ebdd25fe9fdab424
|
||||
R f5990a37fefdac605c3b095e15862cce
|
||||
U pweilbacher
|
||||
Z 75bb214bc15d003fdd9b89fe801780b6
|
||||
|
||||
@@ -1 +1 @@
|
||||
4a1ae9d0320de1013a3b5f24ebdd25fe9fdab424
|
||||
02e123bb9b3da81bc8ee8bab7a2c54bbaadc5123
|
||||
10
src/os_os2.c
10
src/os_os2.c
@@ -63,8 +63,7 @@ typedef struct os2File os2File;
|
||||
struct os2File {
|
||||
const sqlite3_io_methods *pMethod; /* Always the first entry */
|
||||
HFILE h; /* Handle for accessing the file */
|
||||
int delOnClose; /* True if file is to be deleted on close */
|
||||
char* pathToDel; /* Name of file to delete on close */
|
||||
char* pathToDel; /* Name of file to delete on close, NULL if not */
|
||||
unsigned char locktype; /* Type of lock currently held on this file */
|
||||
};
|
||||
|
||||
@@ -83,11 +82,10 @@ int os2Close( sqlite3_file *id ){
|
||||
OSTRACE2( "CLOSE %d\n", pFile->h );
|
||||
rc = DosClose( pFile->h );
|
||||
pFile->locktype = NO_LOCK;
|
||||
if( pFile->delOnClose != 0 ){
|
||||
if( pFile->pathToDel != NULL ){
|
||||
rc = DosForceDelete( (PSZ)pFile->pathToDel );
|
||||
}
|
||||
if( pFile->pathToDel ){
|
||||
free( pFile->pathToDel );
|
||||
pFile->pathToDel = NULL;
|
||||
}
|
||||
id = 0;
|
||||
OpenCounter( -1 );
|
||||
@@ -692,13 +690,11 @@ static int os2Open(
|
||||
| SQLITE_OPEN_SUBJOURNAL) ){
|
||||
//ulFileAttribute = FILE_HIDDEN; //for debugging, we want to make sure it is deleted
|
||||
ulFileAttribute = FILE_NORMAL;
|
||||
pFile->delOnClose = 1;
|
||||
pFile->pathToDel = (char*)malloc(sizeof(char) * pVfs->mxPathname);
|
||||
sqlite3OsFullPathname(pVfs, zName, pVfs->mxPathname, pFile->pathToDel);
|
||||
OSTRACE1( "OPEN hidden/delete on close file attributes\n" );
|
||||
}else{
|
||||
ulFileAttribute = FILE_ARCHIVED | FILE_NORMAL;
|
||||
pFile->delOnClose = 0;
|
||||
pFile->pathToDel = NULL;
|
||||
OSTRACE1( "OPEN normal file attribute\n" );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user