/ Check-in [c4eb2100]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Work around win2k problems so that single-character filenames can be used. Ticket #2151. (CVS 3582)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c4eb2100c39356e1816cc6514d65155e47ea1a1d
User & Date: drh 2007-01-09 15:32:18
Context
2007-01-09
17:18
Fix the windows OS layer so that it returns detailed IOERR error codes. (CVS 3583) check-in: 4b36de46 user: drh tags: trunk
15:32
Work around win2k problems so that single-character filenames can be used. Ticket #2151. (CVS 3582) check-in: c4eb2100 user: drh tags: trunk
15:06
Documentation and tests to show that the cause of a parsing error is available on sqlite3_errmsg after sqlite3_step return SQLITE_SCHEMA. (CVS 3581) check-in: 31a661d4 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_win.c.

  1399   1399     /* WinCE has no concept of a relative pathname, or so I am told. */
  1400   1400     zFull = sqliteStrDup(zRelative);
  1401   1401   #else
  1402   1402     int nByte;
  1403   1403     void *zConverted;
  1404   1404     zConverted = convertUtf8Filename(zRelative);
  1405   1405     if( isNT() ){
  1406         -    WCHAR *zTemp, *zNotUsedW;
  1407         -    nByte = GetFullPathNameW((WCHAR*)zConverted, 0, 0, &zNotUsedW) + 1;
         1406  +    WCHAR *zTemp;
         1407  +    nByte = GetFullPathNameW((WCHAR*)zConverted, 0, 0, 0) + 3;
  1408   1408       zTemp = sqliteMalloc( nByte*sizeof(zTemp[0]) );
  1409   1409       if( zTemp==0 ){
  1410   1410         sqliteFree(zConverted);
  1411   1411         return 0;
  1412   1412       }
  1413         -    GetFullPathNameW((WCHAR*)zConverted, nByte, zTemp, &zNotUsedW);
         1413  +    GetFullPathNameW((WCHAR*)zConverted, nByte, zTemp, 0);
  1414   1414       sqliteFree(zConverted);
  1415   1415       zFull = unicodeToUtf8(zTemp);
  1416   1416       sqliteFree(zTemp);
  1417   1417     }else{
  1418         -    char *zTemp, *zNotUsed;
  1419         -    nByte = GetFullPathNameA((char*)zConverted, 0, 0, &zNotUsed) + 1;
         1418  +    char *zTemp;
         1419  +    nByte = GetFullPathNameA((char*)zConverted, 0, 0, 0) + 3;
  1420   1420       zTemp = sqliteMalloc( nByte*sizeof(zTemp[0]) );
  1421   1421       if( zTemp==0 ){
  1422   1422         sqliteFree(zConverted);
  1423   1423         return 0;
  1424   1424       }
  1425         -    GetFullPathNameA((char*)zConverted, nByte, zTemp, &zNotUsed);
         1425  +    GetFullPathNameA((char*)zConverted, nByte, zTemp, 0);
  1426   1426       sqliteFree(zConverted);
  1427   1427       zFull = mbcsToUtf8(zTemp);
  1428   1428       sqliteFree(zTemp);
  1429   1429     }
  1430   1430   #endif
  1431   1431     return zFull;
  1432   1432   }