Fossil SCM

Possibly incorrect column index for isexe in stash_add_file_or_dir

Fixed

d6132e4d66a7c99… · opened 15 years, 2 months ago

Type
Code_Defect
Priority
Severity
Minor
Resolution
Fixed
Subsystem
Created
Jan. 17, 2011 10:45 p.m.

If I read the code correctly, in stash.c we have the following SQL statement on line 65:

  blob_appendf(&sql;,
    "SELECT deleted, isexe, mrid, pathname, coalesce(origname,pathname)"
    "  FROM vfile"
    " WHERE vid=%d AND (chnged OR deleted OR origname NOT NULL OR mrid==0)",
    vid
  );

"isexe" is at column 1. But then on lines 97-99:

#ifdef _WIN32
    db_bind_int(&ins;, ":isexe", db_column_int(&q;, 2));
#endif

So it will not preserve isexe bit on Windows, but instead use mrid for it.

Shouldn't it be like this instead: db_column_int(&q, 1)?

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button