Fossil SCM
Bug-fix: didn't compile on win32, and handle extended UNC paths correctly.
Commit
da8d516fe1a4c04a43c6adcdf6af3bab9deedbcb
Parent
1b9893bdc8e8ec9…
1 file changed
+2
-2
+2
-2
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -35144,11 +35144,11 @@ | ||
| 35144 | 35144 | if( zWideFilename==0 ){ |
| 35145 | 35145 | return 0; |
| 35146 | 35146 | } |
| 35147 | 35147 | if( winIsDirSep(zFilename[0]) && winIsDirSep(zFilename[1]) ){ |
| 35148 | 35148 | memcpy(zWideFilename, L"\\\\?\\UNC\\", 16); |
| 35149 | - nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1, zWideFilename+6, | |
| 35149 | + nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename+2, -1, zWideFilename+8, | |
| 35150 | 35150 | nChar); |
| 35151 | 35151 | }else if( winIsDriveLetterAndColon(zFilename) && winIsDirSep(zFilename[2])) { |
| 35152 | 35152 | memcpy(zWideFilename, L"\\\\?\\", 8); |
| 35153 | 35153 | nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1, zWideFilename+4, |
| 35154 | 35154 | nChar); |
| @@ -36093,11 +36093,11 @@ | ||
| 36093 | 36093 | return SQLITE_OK; |
| 36094 | 36094 | } |
| 36095 | 36095 | if( osIsNT() ){ |
| 36096 | 36096 | zConverted = winUtf8ToUnicode(zRelative); |
| 36097 | 36097 | }else{ |
| 36098 | - zConverted = sqlite3_win32_utf8_to_mbcs(zFilename);; | |
| 36098 | + zConverted = sqlite3_win32_utf8_to_mbcs(zRelative); | |
| 36099 | 36099 | } |
| 36100 | 36100 | if( zConverted==0 ){ |
| 36101 | 36101 | return SQLITE_IOERR_NOMEM; |
| 36102 | 36102 | } |
| 36103 | 36103 | if( osIsNT() ){ |
| 36104 | 36104 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -35144,11 +35144,11 @@ | |
| 35144 | if( zWideFilename==0 ){ |
| 35145 | return 0; |
| 35146 | } |
| 35147 | if( winIsDirSep(zFilename[0]) && winIsDirSep(zFilename[1]) ){ |
| 35148 | memcpy(zWideFilename, L"\\\\?\\UNC\\", 16); |
| 35149 | nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1, zWideFilename+6, |
| 35150 | nChar); |
| 35151 | }else if( winIsDriveLetterAndColon(zFilename) && winIsDirSep(zFilename[2])) { |
| 35152 | memcpy(zWideFilename, L"\\\\?\\", 8); |
| 35153 | nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1, zWideFilename+4, |
| 35154 | nChar); |
| @@ -36093,11 +36093,11 @@ | |
| 36093 | return SQLITE_OK; |
| 36094 | } |
| 36095 | if( osIsNT() ){ |
| 36096 | zConverted = winUtf8ToUnicode(zRelative); |
| 36097 | }else{ |
| 36098 | zConverted = sqlite3_win32_utf8_to_mbcs(zFilename);; |
| 36099 | } |
| 36100 | if( zConverted==0 ){ |
| 36101 | return SQLITE_IOERR_NOMEM; |
| 36102 | } |
| 36103 | if( osIsNT() ){ |
| 36104 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -35144,11 +35144,11 @@ | |
| 35144 | if( zWideFilename==0 ){ |
| 35145 | return 0; |
| 35146 | } |
| 35147 | if( winIsDirSep(zFilename[0]) && winIsDirSep(zFilename[1]) ){ |
| 35148 | memcpy(zWideFilename, L"\\\\?\\UNC\\", 16); |
| 35149 | nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename+2, -1, zWideFilename+8, |
| 35150 | nChar); |
| 35151 | }else if( winIsDriveLetterAndColon(zFilename) && winIsDirSep(zFilename[2])) { |
| 35152 | memcpy(zWideFilename, L"\\\\?\\", 8); |
| 35153 | nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1, zWideFilename+4, |
| 35154 | nChar); |
| @@ -36093,11 +36093,11 @@ | |
| 36093 | return SQLITE_OK; |
| 36094 | } |
| 36095 | if( osIsNT() ){ |
| 36096 | zConverted = winUtf8ToUnicode(zRelative); |
| 36097 | }else{ |
| 36098 | zConverted = sqlite3_win32_utf8_to_mbcs(zRelative); |
| 36099 | } |
| 36100 | if( zConverted==0 ){ |
| 36101 | return SQLITE_IOERR_NOMEM; |
| 36102 | } |
| 36103 | if( osIsNT() ){ |
| 36104 |