Fossil

Check-in [336e194c]
Login

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

Overview
Comment:Fix an assert() that fires if the "stash" command is used after having done an "rm". Ticket [3ce0ea97522581]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 336e194c4d1e41a39fd788e038000c03aa8dc0f9
User & Date: drh 2011-07-13 21:15:59
References
2011-07-22
20:20 Fixed ticket [5124563a]: stash save fails after file remove plus 2 other changes artifact: 57ce2f37 user: anonymous
Context
2011-07-13
21:24
Update the "fossil wiki export" command to use standard file output utilities so that line endings will be handled correctly. Ticket [d9040c134bf41] check-in: 11f2f71f user: drh tags: trunk
21:15
Fix an assert() that fires if the "stash" command is used after having done an "rm". Ticket [3ce0ea97522581] check-in: 336e194c user: drh tags: trunk
2011-07-12
20:27
Be sure to flush g.httpOut at the end of cgi_reply(). check-in: 2cd0c765 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/stash.c.

98
99
100
101
102
103
104

105
106
107
108
109
110
111
    db_bind_text(&ins, ":orig", zOrig);
    db_bind_text(&ins, ":new", zName);
    if( rid==0 ){
      /* A new file */
      blob_read_from_file(&content, zPath);
      db_bind_blob(&ins, ":content", &content);
    }else if( deleted ){

      db_bind_null(&ins, ":content");
    }else{
      /* A modified file */
      Blob orig;
      Blob disk;
      blob_read_from_file(&disk, zPath);
      content_get(rid, &orig);







>







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    db_bind_text(&ins, ":orig", zOrig);
    db_bind_text(&ins, ":new", zName);
    if( rid==0 ){
      /* A new file */
      blob_read_from_file(&content, zPath);
      db_bind_blob(&ins, ":content", &content);
    }else if( deleted ){
      blob_zero(&content);
      db_bind_null(&ins, ":content");
    }else{
      /* A modified file */
      Blob orig;
      Blob disk;
      blob_read_from_file(&disk, zPath);
      content_get(rid, &orig);