diff options
-rw-r--r-- | manifest | 12 | ||||
-rw-r--r-- | manifest.uuid | 2 | ||||
-rw-r--r-- | src/os_unix.c | 13 |
3 files changed, 20 insertions, 7 deletions
@@ -1,5 +1,5 @@ -C Add\san\sapplication\sID\sfor\sMBTiles\stilesets. -D 2014-06-16T18:17:21.276 +C Add\sthe\sSQLITE_UNLINK_AFTER_CLOSE\scompile-time\soption.\s\sIf\senabled,\sthe\nunlink\sof\stemporary\sfiles\son\sunix\sis\sdeferred\suntil\safter\sthe\sfile\sis\sclosed. +D 2014-06-16T18:35:06.993 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in ed5e4aae4799f724699d5509fac2977786414dbb F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -207,7 +207,7 @@ F src/os.c 1b147e4cf7cc39e618115c14a086aed44bc91ace F src/os.h 60d419395e32a8029fa380a80a3da2e9030f635e F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04 F src/os_setup.h c9d4553b5aaa6f73391448b265b89bed0b890faa -F src/os_unix.c ae4b5240af4619d711301d7992396e182585269f +F src/os_unix.c 9a97268f1ea97ddea17f1c392f7c76197ac4cea9 F src/os_win.c 8dbf6c11780fe2eb96c1f289e664d0c7b2911d37 F src/os_win.h 057344a6720b4c8405d9bd98f58cb37a6ee46c25 F src/pager.c f6bb1fa6cdf2062f2d8aec3e64db302bca519ab8 @@ -1177,7 +1177,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 0617e20a33e08754aea14e60db44e557c13978e3 -R dfffbe0f43f71c007c108ea405a7d777 +P 837f6404230fc642e9084140c4b30cca1be43375 +R ecda5288cdc332685194aeb4a49d9a9a U drh -Z 9d670db05a88e1abc553c0c72f8664c9 +Z 0e0dd722026abbeb65bd76ad2a4f4176 diff --git a/manifest.uuid b/manifest.uuid index c4c9f65f4..3ea2a9a55 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -837f6404230fc642e9084140c4b30cca1be43375
\ No newline at end of file +e43a2f92b616ec885a1ee62911fa8f6991d277f7
\ No newline at end of file diff --git a/src/os_unix.c b/src/os_unix.c index fc320a492..7eb25c85f 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -1919,6 +1919,13 @@ static int closeUnixFile(sqlite3_file *id){ pFile->pId = 0; } #endif +#ifdef SQLITE_UNLINK_AFTER_CLOSE + if( pFile->ctrlFlags & UNIXFILE_DELETE ){ + osUnlink(pFile->zPath); + sqlite3_free(*(char**)&pFile->zPath); + pFile->zPath = 0; + } +#endif OSTRACE(("CLOSE %-3d\n", pFile->h)); OpenCounter(-1); sqlite3_free(pFile->pUnused); @@ -5772,6 +5779,12 @@ static int unixOpen( if( isDelete ){ #if OS_VXWORKS zPath = zName; +#elif defined(SQLITE_UNLINK_AFTER_CLOSE) + zPath = sqlite3_mprintf("%s", zName); + if( zPath==0 ){ + robust_close(p, fd, __LINE__); + return SQLITE_NOMEM; + } #else osUnlink(zName); #endif |