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

Overview
Comment:Add comments to better explain what it happening for the out-of-tree check in the "add" command.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | pending-review
Files: files | file ages | folders
SHA1:d83fc58dead2d03428a763b0890b8b5fbffb7957
User & Date: drh 2014-01-09 13:17:23
Context
2014-01-09
13:18
Make sure it is not possible to add files that are outside of the current checkout. check-in: c6f32a26 user: drh tags: trunk
13:17
Add comments to better explain what it happening for the out-of-tree check in the "add" command. Closed-Leaf check-in: d83fc58d user: drh tags: pending-review
05:56
Attempts to add files outside the open checkout tree result in fatal error. check-in: f0de41fd user: andybradford tags: pending-review
Changes

Changes to src/add.c.

269
270
271
272
273
274
275


276
277

278
279
280
281
282
283
284
  
  /* Load the names of all files that are to be added into sfile temp table */
  for(i=2; i<g.argc; i++){
    char *zName;
    int isDir;
    Blob fullName;



    file_tree_name(g.argv[i], &fullName, 1);
    blob_reset(&fullName);

    file_canonical_name(g.argv[i], &fullName, 0);
    zName = blob_str(&fullName);
    isDir = file_wd_isdir(zName);
    if( isDir==1 ){
      vfile_scan(&fullName, nRoot-1, scanFlags, pClean, pIgnore);
    }else if( isDir==0 ){
      fossil_warning("not found: %s", zName);







>
>


>







269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
  
  /* Load the names of all files that are to be added into sfile temp table */
  for(i=2; i<g.argc; i++){
    char *zName;
    int isDir;
    Blob fullName;

    /* file_tree_name() throws a fatal error if g.argv[i] is outside of the
    ** checkout. */
    file_tree_name(g.argv[i], &fullName, 1);
    blob_reset(&fullName);

    file_canonical_name(g.argv[i], &fullName, 0);
    zName = blob_str(&fullName);
    isDir = file_wd_isdir(zName);
    if( isDir==1 ){
      vfile_scan(&fullName, nRoot-1, scanFlags, pClean, pIgnore);
    }else if( isDir==0 ){
      fossil_warning("not found: %s", zName);