]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Translate filenames of the form "/c:/*" into just "c:/*" on WinRT and Cygwin.
authordrh <drh@noemail.net>
Mon, 6 Jun 2016 20:27:15 +0000 (20:27 +0000)
committerdrh <drh@noemail.net>
Mon, 6 Jun 2016 20:27:15 +0000 (20:27 +0000)
(SQLite has long done this for Win32/WinNT.)

FossilOrigin-Name: f8470ffc49918099820cc0008b9089e5fe8a7dff

manifest
manifest.uuid
src/os_win.c

index 7b75e3ac802480ba5477d6031e00e6920cd1ffdc..f4ea0d3997eb282829b587be2f0438cde20e6eef 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\slempar.c\sso\sthat\sthe\sshift-reduce\soptimization\sworks\sfor\serror\sprocessing.\nThis\sis\sa\sLemon\sissue\sonly\sand\shas\sno\simpact\son\sSQLite.
-D 2016-06-06T18:17:36.269
+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
 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 852fc2ff6084296348ed3739c548b2cf32df394e
+F src/os_win.c 59ccd6a22c90c7eb06721060a881484664f67487
 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 45531654f7f5be3a08e9ee8598f14efe028245d8
-R ca88b1e538e49deb8a0ada7b00edb9b6
+P 3665a2f554e5b8d2717d952dbaf325a39c637c31
+R 1ce06fe2980795cbe08c14d88bf14c86
 U drh
-Z 8cae88ab86923e6f759f4ae6a119c6f0
+Z b8067fa7fb955f58e26e08c4eb3e1ea5
index 589f69970195dff6d5287a0f4edeab50baa6a834..06742e2e7b498782e88528dad9b6891ef8e578db 100644 (file)
@@ -1 +1 @@
-3665a2f554e5b8d2717d952dbaf325a39c637c31
\ No newline at end of file
+f8470ffc49918099820cc0008b9089e5fe8a7dff
\ No newline at end of file
index 9a34d9a10612b8f20d6f30278d862f7215c59a6d..6458d283c87439c4d97bdac5fbdd33a279ea6e68 100644 (file)
@@ -5274,6 +5274,13 @@ static int winFullPathname(
   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.
+  */
+  if( zRelative[0]=='/' && winIsDriveLetterAndColon(zRelative+1) ){
+    zRelative++;
+  }
+
   if ( sqlite3_data_directory && !winIsVerbatimPathname(zRelative) ){
     /*
     ** NOTE: We are dealing with a relative path name and the data
@@ -5329,6 +5336,13 @@ 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) ){