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

Overview
Comment:When the "update" command has a FILES argument which is the top-level directory, that is the same as having no FILES argument at all. In other words, all files are updated.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:2d1a03736ac10439aaad9c68a93500e2d0672bce
User & Date: drh 2010-11-08 19:02:49
Context
2010-11-08
19:23
Fix a corner-case in file_tree_name() - specifically when the input is the name of the root of the local tree, return ".". check-in: f98114c9 user: drh tags: trunk
19:02
When the "update" command has a FILES argument which is the top-level directory, that is the same as having no FILES argument at all. In other words, all files are updated. check-in: 2d1a0373 user: drh tags: trunk
15:33
Fix a typo in an error message in the merge logic. check-in: 370a89c8 user: drh tags: trunk
Changes

Changes to src/update.c.

185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
    for(i=3; i<g.argc; i++){
      file_tree_name(g.argv[i], &treename, 1);
      if( file_isdir(g.argv[i])==1 ){
        if( blob_size(&treename)>0 ){
          blob_appendf(&sql, "%sfn NOT GLOB '%b/*' ", zSep, &treename);
        }else{
          blob_reset(&sql);
          blob_append(&sql, "DELETE FROM fv", -1);
          break;
        }
      }else{
        blob_appendf(&sql, "%sfn<>%B ", zSep, &treename);
      }
      zSep = "AND ";
      blob_reset(&treename);
    }
    /* fprintf(stderr, "%s\n", blob_str(&sql)); */
    db_multi_exec(blob_str(&sql));
    blob_reset(&sql);
  }

  db_prepare(&q, 
    "SELECT fn, idv, ridv, idt, ridt, chnged FROM fv ORDER BY 1"
  );







<








<







185
186
187
188
189
190
191

192
193
194
195
196
197
198
199

200
201
202
203
204
205
206
    for(i=3; i<g.argc; i++){
      file_tree_name(g.argv[i], &treename, 1);
      if( file_isdir(g.argv[i])==1 ){
        if( blob_size(&treename)>0 ){
          blob_appendf(&sql, "%sfn NOT GLOB '%b/*' ", zSep, &treename);
        }else{
          blob_reset(&sql);

          break;
        }
      }else{
        blob_appendf(&sql, "%sfn<>%B ", zSep, &treename);
      }
      zSep = "AND ";
      blob_reset(&treename);
    }

    db_multi_exec(blob_str(&sql));
    blob_reset(&sql);
  }

  db_prepare(&q, 
    "SELECT fn, idv, ridv, idt, ridt, chnged FROM fv ORDER BY 1"
  );