From 0e6cf0aa5db4b041bfc2ce61eaa86f0de4fd50cb Mon Sep 17 00:00:00 2001 From: pweilbacher Date: Tue, 6 May 2008 22:15:26 +0000 Subject: [PATCH] The pathToDel element of the os2File structure should be in the local codepage instead of UTF-8 to make DosForceDelete() work. (CVS 5091) FossilOrigin-Name: 76028b5e5d220e1d44667b2fef8bdfc580c913b0 --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/os_os2.c | 5 +++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/manifest b/manifest index 973be6eb72..0f0342b55c 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Remove\sdelOnClose\sflag\sfrom\sos2File\sstructure,\suse\spathToDel==NULL\sfor\sthe\ssame\scheck.\s(CVS\s5090) -D 2008-05-06T21:42:10 +C The\spathToDel\selement\sof\sthe\sos2File\sstructure\sshould\sbe\sin\sthe\slocal\scodepage\sinstead\sof\sUTF-8\sto\smake\sDosForceDelete()\swork.\s(CVS\s5091) +D 2008-05-06T22:15:27 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 a5b4cab0cab950b9a11a539a137cd80419f91ea3 +F src/os_os2.c dec26e64fb55587722e45b417b5df2a1b28d3b2a 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 4a1ae9d0320de1013a3b5f24ebdd25fe9fdab424 -R f5990a37fefdac605c3b095e15862cce +P 02e123bb9b3da81bc8ee8bab7a2c54bbaadc5123 +R dbb02e03bb9d706015d0639a34b12757 U pweilbacher -Z 75bb214bc15d003fdd9b89fe801780b6 +Z c75f0910bcf06125af020d4b55c1ab22 diff --git a/manifest.uuid b/manifest.uuid index 489141054a..4e15d2f776 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -02e123bb9b3da81bc8ee8bab7a2c54bbaadc5123 \ No newline at end of file +76028b5e5d220e1d44667b2fef8bdfc580c913b0 \ No newline at end of file diff --git a/src/os_os2.c b/src/os_os2.c index 20d8ecafdd..7eebca91c1 100644 --- a/src/os_os2.c +++ b/src/os_os2.c @@ -688,10 +688,11 @@ static int os2Open( if( flags & (SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_TEMP_JOURNAL | SQLITE_OPEN_SUBJOURNAL) ){ + char pathUtf8[CCHMAXPATH]; //ulFileAttribute = FILE_HIDDEN; //for debugging, we want to make sure it is deleted ulFileAttribute = FILE_NORMAL; - pFile->pathToDel = (char*)malloc(sizeof(char) * pVfs->mxPathname); - sqlite3OsFullPathname(pVfs, zName, pVfs->mxPathname, pFile->pathToDel); + sqlite3OsFullPathname( pVfs, zName, CCHMAXPATH, pathUtf8 ); + pFile->pathToDel = convertUtf8PathToCp( pathUtf8 ); OSTRACE1( "OPEN hidden/delete on close file attributes\n" ); }else{ ulFileAttribute = FILE_ARCHIVED | FILE_NORMAL;