48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
db_begin_transaction();
for(i=2; i<g.argc; i++){
char *zName;
char *zPath;
Blob pathname;
int isDir;
zName = mprintf("%s", g.argv[i]);
isDir = file_isdir(zName);
if( isDir==1 ) continue;
if( isDir==0 ){
fossil_fatal("not found: %s", zName);
}
if( isDir==2 && access(zName, R_OK) ){
fossil_fatal("cannot open %s", zName);
|
|
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
db_begin_transaction();
for(i=2; i<g.argc; i++){
char *zName;
char *zPath;
Blob pathname;
int isDir;
zName = mprintf("%/", g.argv[i]);
isDir = file_isdir(zName);
if( isDir==1 ) continue;
if( isDir==0 ){
fossil_fatal("not found: %s", zName);
}
if( isDir==2 && access(zName, R_OK) ){
fossil_fatal("cannot open %s", zName);
|
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
}
db_begin_transaction();
for(i=2; i<g.argc; i++){
char *zName;
char *zPath;
Blob pathname;
zName = mprintf("%s", g.argv[i]);
file_tree_name(zName, &pathname);
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{
db_multi_exec("UPDATE vfile SET deleted=1 WHERE pathname=%Q", zPath);
|
|
|
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
}
db_begin_transaction();
for(i=2; i<g.argc; i++){
char *zName;
char *zPath;
Blob pathname;
zName = mprintf("%/", g.argv[i]);
file_tree_name(zName, &pathname);
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{
db_multi_exec("UPDATE vfile SET deleted=1 WHERE pathname=%Q", zPath);
|