366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
|
zName = mprintf("%/", g.argv[i]);
if( file_isdir(zName) == 1 ){
int sz = strlen(zName);
if( sz>0 && zName[sz-1]=='/' ){ zName[sz-1] = 0; }
del_directory_content(zName);
} else {
char *zPath;
Blob pathname;
file_tree_name(zName, &pathname, 1);
zPath = blob_str(&pathname);
if( !db_exists(
"SELECT 1 FROM vfile WHERE pathname=%Q AND NOT deleted", zPath) ){
fossil_fatal("not in the repository: %s", zName);
}else{
delete_one_file(zPath);
}
blob_reset(&pathname);
}
free(zName);
}
db_multi_exec("DELETE FROM vfile WHERE deleted AND rid=0");
db_end_transaction(0);
}
|
<
<
<
<
<
<
<
<
|
<
<
|
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
|
zName = mprintf("%/", g.argv[i]);
if( file_isdir(zName) == 1 ){
int sz = strlen(zName);
if( sz>0 && zName[sz-1]=='/' ){ zName[sz-1] = 0; }
del_directory_content(zName);
} else {
delete_one_file(zName);
}
free(zName);
}
db_multi_exec("DELETE FROM vfile WHERE deleted AND rid=0");
db_end_transaction(0);
}
|