Fossil

Check-in [bb440899]
Login

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

Overview
Comment:As it turns out that _wstati64() cannot handled the special "\\?\" prefix, work around that. Otherwise the win32-longpath VFS is quite useless for fossil. Maybe a better solution should be worked out, not using _wstati64() at all.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:bb440899d387093de73c079c4565a811705e6f83
User & Date: jan.nijtmans 2013-12-11 13:00:23
Context
2013-12-12
09:37
Make "win32-longpath" the default VFS on win32, eliminating all path limitations (up to ~32767 chars). TODO: eliminate use of the the function _wstati64(), that appears to be the only Win32 function left which cannot handle such long paths. Everything else needed is done. check-in: 1b9893bd user: jan.nijtmans tags: win32-longpath
2013-12-11
23:20
Remove usage of the 'win32-longpath' VFS as it is unlikely to work correctly with the various MSVCRT functions currently required by Fossil. check-in: 19de4b5b user: mistachkin tags: trunk
13:00
As it turns out that _wstati64() cannot handled the special "\\?\" prefix, work around that. Otherwise the win32-longpath VFS is quite useless for fossil. Maybe a better solution should be worked out, not using _wstati64() at all. check-in: bb440899 user: jan.nijtmans tags: trunk
12:06
Update the built-in SQLite to the latest version 3.8.3 alpha. check-in: faa2e9d5 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/file.c.

72
73
74
75
76
77
78









79

80
81
82
83
84
85
86
  if( isWd && g.allowSymlinks ){
    rc = lstat(zMbcs, buf);
  }else{
    rc = stat(zMbcs, buf);
  }
#else
  wchar_t *zMbcs = fossil_utf8_to_filename(zFilename);









  rc = _wstati64(zMbcs, buf);

#endif
  fossil_filename_free(zMbcs);
  return rc;
}

/*
** Fill in the fileStat variable for the file named zFilename.







>
>
>
>
>
>
>
>
>
|
>







72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
  if( isWd && g.allowSymlinks ){
    rc = lstat(zMbcs, buf);
  }else{
    rc = stat(zMbcs, buf);
  }
#else
  wchar_t *zMbcs = fossil_utf8_to_filename(zFilename);
  if( memcmp(zMbcs, L"\\\\?\\", 8)==0 ){
    /* Unfortunately, _wstati64 cannot handle extended prefixes. */
    if( memcmp(zMbcs+4, "UNC\\", 8)==0 ){
      zMbcs[6] = '\\';
      rc = _wstati64(zMbcs+6, buf);
    }else{
      rc = _wstati64(zMbcs+4, buf);
    }
  }else{
    rc = _wstati64(zMbcs, buf);
  }
#endif
  fossil_filename_free(zMbcs);
  return rc;
}

/*
** Fill in the fileStat variable for the file named zFilename.