diff options
author | drh <drh@noemail.net> | 2016-06-06 20:27:15 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-06-06 20:27:15 +0000 |
commit | 8a5fd2611686c62c06ac8b5f0bad9c2db2ac5dce (patch) | |
tree | 7a533a49e959fa4f92dfdd96bca7be08e673f4ca /src | |
parent | 0efd37f28b2918655de43acc8a32d6e75a3f2735 (diff) | |
download | sqlite-8a5fd2611686c62c06ac8b5f0bad9c2db2ac5dce.tar.gz sqlite-8a5fd2611686c62c06ac8b5f0bad9c2db2ac5dce.zip |
Translate filenames of the form "/c:/*" into just "c:/*" on WinRT and Cygwin.
(SQLite has long done this for Win32/WinNT.)
FossilOrigin-Name: f8470ffc49918099820cc0008b9089e5fe8a7dff
Diffstat (limited to 'src')
-rw-r--r-- | src/os_win.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/os_win.c b/src/os_win.c index 9a34d9a10..6458d283c 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -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) ){ |