Check-in [61d49d92bb]
Not logged in

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

Overview
Comment:Change a couple of unlink()'s to file_delete().
Timelines: family | ancestors | descendants | both | symlinks
Files: files | file ages | folders
SHA1:61d49d92bb50fabf3acfa47115bf4ea573e37640
User & Date: dmitry 2011-09-01 23:55:24
Context
2011-09-02
09:34
Bring Makefile.in back. check-in: 6729562675 user: dmitry tags: symlinks
2011-09-01
23:55
Change a couple of unlink()'s to file_delete(). check-in: 61d49d92bb user: dmitry tags: symlinks
23:44
Fix indentation in update.c. check-in: 1d54dce41e user: dmitry tags: symlinks
Changes

Changes to src/stash.c.

216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
      }else{
        blob_read_from_file(&disk, zOPath);
      }
      content_get(rid, &a);
      blob_delta_apply(&a, &delta, &b);
      if( blob_compare(&disk, &a)==0 && isLink == isNewLink ){
        if( isLink || isNewLink ){
          unlink(zNPath);
        }
        if( isLink ){
          create_symlink(blob_str(&b), zNPath);
        }else{
          blob_write_to_file(&b, zNPath);          
        }
        file_setexe(zNPath, isExec);







|







216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
      }else{
        blob_read_from_file(&disk, zOPath);
      }
      content_get(rid, &a);
      blob_delta_apply(&a, &delta, &b);
      if( blob_compare(&disk, &a)==0 && isLink == isNewLink ){
        if( isLink || isNewLink ){
          file_delete(zNPath);
        }
        if( isLink ){
          create_symlink(blob_str(&b), zNPath);
        }else{
          blob_write_to_file(&b, zNPath);          
        }
        file_setexe(zNPath, isExec);

Changes to src/update.c.

667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
        fossil_print("DELETE: %s\n", zFile);
      }
      db_multi_exec("DELETE FROM vfile WHERE pathname=%Q", zFile);
    }else{
      sqlite3_int64 mtime;
      undo_save(zFile);
      if( file_size(zFull)>=0 && (isLink || file_islink(zFull)) ){
        unlink(zFull);
      }
      if( isLink ){
        create_symlink(blob_str(&record), zFull);
      }else{
        blob_write_to_file(&record, zFull);
      }
      file_setexe(zFull, isExe);







|







667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
        fossil_print("DELETE: %s\n", zFile);
      }
      db_multi_exec("DELETE FROM vfile WHERE pathname=%Q", zFile);
    }else{
      sqlite3_int64 mtime;
      undo_save(zFile);
      if( file_size(zFull)>=0 && (isLink || file_islink(zFull)) ){
        file_delete(zFull);
      }
      if( isLink ){
        create_symlink(blob_str(&record), zFull);
      }else{
        blob_write_to_file(&record, zFull);
      }
      file_setexe(zFull, isExe);