Fossil

Check-in [abdedb21]
Login

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

Overview
Comment:Fix an off-by-one error in stash_add_file_or_dir. Windows only. Ticket [d6132e4d66a7c994f9].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:abdedb21da0e2c8df754393f62f0a36a947b404a
User & Date: drh 2011-01-17 23:49:16
Context
2011-01-18
14:43
Improved hyperlinking in the RSS feed. check-in: 66d93f33 user: drh tags: trunk
2011-01-17
23:49
Fix an off-by-one error in stash_add_file_or_dir. Windows only. Ticket [d6132e4d66a7c994f9]. check-in: abdedb21 user: drh tags: trunk
23:47
Extra resilience on the automatic chroot mechanism. check-in: 13d3cad5 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/stash.c.

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
    char *zPath = mprintf("%s%s", g.zLocalRoot, zName);
    Blob content;

    db_bind_int(&ins, ":rid", rid);
    db_bind_int(&ins, ":isadd", rid==0);
    db_bind_int(&ins, ":isrm", deleted);
#ifdef _WIN32
    db_bind_int(&ins, ":isexe", db_column_int(&q, 2));
#endif
    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);







|







91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
    char *zPath = mprintf("%s%s", g.zLocalRoot, zName);
    Blob content;

    db_bind_int(&ins, ":rid", rid);
    db_bind_int(&ins, ":isadd", rid==0);
    db_bind_int(&ins, ":isrm", deleted);
#ifdef _WIN32
    db_bind_int(&ins, ":isexe", db_column_int(&q, 1));
#endif
    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);