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

Overview
Comment:Better use GetCurrentDirectoryW in stead of _wgetcwd.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:4e463bf7bac9958d3171c3e385d907c43a1bfd64
User & Date: jan.nijtmans 2013-12-13 13:48:07
Context
2013-12-13
20:36
Prevent the argument that follows -A from being interpreted as a repository and avoid incorrect file already exists errors. check-in: cc421c00 user: andybradford tags: trunk
17:50
Prevent sym- tag that matches branch name that sorts prior to branch name from displaying an option to cancel the tag. Also clean up a couple strcmp. check-in: c36ad48a user: andybradford tags: cancel-tag-fix
14:19
Merge trunk and fix typo (missing backslash) check-in: 84710701 user: jan.nijtmans tags: tkt-change-hook
13:53
merge trunk check-in: 46e1d4c8 user: jan.nijtmans tags: win32-longpath
13:48
Better use GetCurrentDirectoryW in stead of _wgetcwd. check-in: 4e463bf7 user: jan.nijtmans tags: trunk
13:05
Better implementation of file_access() for win32: The function _waccess cannot handle long paths, and lies too much (e.g. when handling specific smb drives). Implementation borrowed from Tcl 8.6: http://core.tcl.tk/tcl/artifact/c6b5d4f8d7?ln=1510-1756 check-in: 0b0eb52c user: jan.nijtmans tags: trunk
Changes

Changes to src/file.c.

942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
*/
void file_getcwd(char *zBuf, int nBuf){
#ifdef _WIN32
  char *zPwdUtf8;
  int nPwd;
  int i;
  wchar_t zPwd[2000];
  if( _wgetcwd(zPwd, sizeof(zPwd)/sizeof(zPwd[0])-1)==0 ){
    fossil_fatal("cannot find the current working directory.");
  }
  zPwdUtf8 = fossil_filename_to_utf8(zPwd);
  nPwd = strlen(zPwdUtf8);
  if( nPwd > nBuf-1 ){
    fossil_fatal("pwd too big: max %d\n", nBuf-1);
  }







|







942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
*/
void file_getcwd(char *zBuf, int nBuf){
#ifdef _WIN32
  char *zPwdUtf8;
  int nPwd;
  int i;
  wchar_t zPwd[2000];
  if( GetCurrentDirectoryW(count(zPwd), zPwd)==0 ){
    fossil_fatal("cannot find the current working directory.");
  }
  zPwdUtf8 = fossil_filename_to_utf8(zPwd);
  nPwd = strlen(zPwdUtf8);
  if( nPwd > nBuf-1 ){
    fossil_fatal("pwd too big: max %d\n", nBuf-1);
  }