/ Check-in [ed15db46]
Login

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

Overview
Comment:Unix OS interface returns SQLITE_CANTOPEN following a getcwd() failure. (CVS 4384)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ed15db4610bc6202c624234e48d234e0005825e4
User & Date: drh 2007-09-03 17:42:17
Context
2007-09-03
18:01
In sqllimits1.test, set MAX_SQL_LENGTH to a value smaller than MAX_LENGTH. (CVS 4385) check-in: 51726a9b user: danielk1977 tags: trunk
17:42
Unix OS interface returns SQLITE_CANTOPEN following a getcwd() failure. (CVS 4384) check-in: ed15db46 user: drh tags: trunk
17:30
Remove an unreachable case from xferOptimization(). Also other minor test coverage improvements. (CVS 4383) check-in: 75af7189 user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
  assert( pVfs->mxPathname==MAX_PATHNAME );
  zOut[MAX_PATHNAME-1] = '\0';
  if( zPath[0]=='/' ){
    sqlite3_snprintf(MAX_PATHNAME, zOut, "%s", zPath);
  }else{
    int nCwd;
    if( getcwd(zOut, MAX_PATHNAME-1)==0 ){
      return SQLITE_ERROR;
    }
    nCwd = strlen(zOut);
    sqlite3_snprintf(MAX_PATHNAME-nCwd, &zOut[nCwd], "/%s", zPath);
  }
  return SQLITE_OK;

#if 0







|







2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
  assert( pVfs->mxPathname==MAX_PATHNAME );
  zOut[MAX_PATHNAME-1] = '\0';
  if( zPath[0]=='/' ){
    sqlite3_snprintf(MAX_PATHNAME, zOut, "%s", zPath);
  }else{
    int nCwd;
    if( getcwd(zOut, MAX_PATHNAME-1)==0 ){
      return SQLITE_CANTOPEN;
    }
    nCwd = strlen(zOut);
    sqlite3_snprintf(MAX_PATHNAME-nCwd, &zOut[nCwd], "/%s", zPath);
  }
  return SQLITE_OK;

#if 0