/ Check-in [90d73c66]
Login

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

Overview
Comment:Fix the unix driver to return an I/O error if unlink fails for any reason other than the file not existing in the first place.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:90d73c66bfa880cdeb688b3016c8b1c58bfcf35f
User & Date: drh 2010-07-14 01:45:23
Context
2010-07-14
06:20
Fix a typo in the IS_BIG_INT macro used by coverage test instrumentation. check-in: 5314ca39 user: dan tags: trunk
01:45
Fix the unix driver to return an I/O error if unlink fails for any reason other than the file not existing in the first place. check-in: 90d73c66 user: drh tags: trunk
00:22
Remove the xShmOpen method from the VFS. Shared-memory is opened automatically by a call to xShmMap. Rename the xShmClose method to xShmUnmap. check-in: 2b68e502 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

4549
4550
4551
4552
4553
4554
4555
4556


4557
4558
4559
4560
4561
4562
4563
  sqlite3_vfs *NotUsed,     /* VFS containing this as the xDelete method */
  const char *zPath,        /* Name of file to be deleted */
  int dirSync               /* If true, fsync() directory after deleting file */
){
  int rc = SQLITE_OK;
  UNUSED_PARAMETER(NotUsed);
  SimulateIOError(return SQLITE_IOERR_DELETE);
  unlink(zPath);


#ifndef SQLITE_DISABLE_DIRSYNC
  if( dirSync ){
    int fd;
    rc = openDirectory(zPath, &fd);
    if( rc==SQLITE_OK ){
#if OS_VXWORKS
      if( fsync(fd)==-1 )







|
>
>







4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
  sqlite3_vfs *NotUsed,     /* VFS containing this as the xDelete method */
  const char *zPath,        /* Name of file to be deleted */
  int dirSync               /* If true, fsync() directory after deleting file */
){
  int rc = SQLITE_OK;
  UNUSED_PARAMETER(NotUsed);
  SimulateIOError(return SQLITE_IOERR_DELETE);
  if( unlink(zPath)==(-1) && errno!=ENOENT ){
    return SQLITE_IOERR_DELETE;
  }
#ifndef SQLITE_DISABLE_DIRSYNC
  if( dirSync ){
    int fd;
    rc = openDirectory(zPath, &fd);
    if( rc==SQLITE_OK ){
#if OS_VXWORKS
      if( fsync(fd)==-1 )