From: mistachkin Date: Mon, 6 Jun 2016 20:36:26 +0000 (+0000) Subject: In winFullPathname, translate '/X:' to 'X:' before doing anything else. X-Git-Tag: version-3.14.0~104 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a58d5fdf5a298a0b020c7cdd57586220622dc3f;p=thirdparty%2Fsqlite.git In winFullPathname, translate '/X:' to 'X:' before doing anything else. FossilOrigin-Name: e404ad705d0e2d96025d05cc88348ffcd0703533 --- diff --git a/manifest b/manifest index f4ea0d3997..a8641b80ec 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Translate\sfilenames\sof\sthe\sform\s"/c:/*"\sinto\sjust\s"c:/*"\son\sWinRT\sand\sCygwin.\n(SQLite\shas\slong\sdone\sthis\sfor\sWin32/WinNT.) -D 2016-06-06T20:27:15.051 +C In\swinFullPathname,\stranslate\s'/X:'\sto\s'X:'\sbefore\sdoing\sanything\selse. +D 2016-06-06T20:36:26.843 F Makefile.in 7321ef0b584224781ec7731408857fa8962c32cc F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 831503fc4e988f571590af1405645fff121b5f1e @@ -367,7 +367,7 @@ F src/os.h 8e976e59eb4ca1c0fca6d35ee803e38951cb0343 F src/os_common.h b2f4707a603e36811d9b1a13278bffd757857b85 F src/os_setup.h c9d4553b5aaa6f73391448b265b89bed0b890faa F src/os_unix.c a9443cdab41d7f3cdf0df3a5aab62fd6e1c9b234 -F src/os_win.c 59ccd6a22c90c7eb06721060a881484664f67487 +F src/os_win.c d4b8faf8896b65818e67070711fdd00d8e620bd6 F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca F src/pager.c c368634b888b1c8740aea83b36bfd266f2443e60 F src/pager.h 8ab6b6feeee4bc0439bfde7ee59ba99df98b9bc3 @@ -1500,7 +1500,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 3665a2f554e5b8d2717d952dbaf325a39c637c31 -R 1ce06fe2980795cbe08c14d88bf14c86 -U drh -Z b8067fa7fb955f58e26e08c4eb3e1ea5 +P f8470ffc49918099820cc0008b9089e5fe8a7dff +R c81f8bc1e79df8beab98e4603e5f0a7e +U mistachkin +Z 376528e39cb88246cfc2bf50694a3c28 diff --git a/manifest.uuid b/manifest.uuid index 06742e2e7b..785cf6ce09 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -f8470ffc49918099820cc0008b9089e5fe8a7dff \ No newline at end of file +e404ad705d0e2d96025d05cc88348ffcd0703533 \ No newline at end of file diff --git a/src/os_win.c b/src/os_win.c index 6458d283c8..edc182a017 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -5269,11 +5269,12 @@ static int winFullPathname( int nFull, /* Size of output buffer in bytes */ char *zFull /* Output buffer */ ){ +#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(__CYGWIN__) + DWORD nByte; + void *zConverted; + char *zOut; +#endif -#if defined(__CYGWIN__) - SimulateIOError( return SQLITE_ERROR ); - UNUSED_PARAMETER(nFull); - assert( nFull>=pVfs->mxPathname ); /* If this path name begins with "/X:", where "X" is any alphabetic ** character, discard the initial "/" from the pathname. */ @@ -5281,6 +5282,10 @@ static int winFullPathname( zRelative++; } +#if defined(__CYGWIN__) + SimulateIOError( return SQLITE_ERROR ); + UNUSED_PARAMETER(nFull); + assert( nFull>=pVfs->mxPathname ); if ( sqlite3_data_directory && !winIsVerbatimPathname(zRelative) ){ /* ** NOTE: We are dealing with a relative path name and the data @@ -5336,13 +5341,6 @@ static int winFullPathname( #if (SQLITE_OS_WINCE || SQLITE_OS_WINRT) && !defined(__CYGWIN__) SimulateIOError( return SQLITE_ERROR ); - /* If this path name begins with "/X:", where "X" is any alphabetic - ** character, discard the initial "/" from the pathname. - */ - if( zRelative[0]=='/' && winIsDriveLetterAndColon(zRelative+1) ){ - zRelative++; - } - /* WinCE has no concept of a relative pathname, or so I am told. */ /* WinRT has no way to convert a relative path to an absolute one. */ if ( sqlite3_data_directory && !winIsVerbatimPathname(zRelative) ){ @@ -5361,17 +5359,6 @@ static int winFullPathname( #endif #if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(__CYGWIN__) - DWORD nByte; - void *zConverted; - char *zOut; - - /* If this path name begins with "/X:", where "X" is any alphabetic - ** character, discard the initial "/" from the pathname. - */ - if( zRelative[0]=='/' && winIsDriveLetterAndColon(zRelative+1) ){ - zRelative++; - } - /* It's odd to simulate an io-error here, but really this is just ** using the io-error infrastructure to test that SQLite handles this ** function failing. This function could fail if, for example, the