Fossil SCM

Fix a bug in "fossil rm". Ticket [15f8f4a4252]

drh 2010-01-24 01:41 trunk
Commit fbcefb6e4ebd5b8e186f86c48adcbaace0e13a45
1 file changed +5 -3
+5 -3
--- src/vfile.c
+++ src/vfile.c
@@ -167,19 +167,21 @@
167167
zName = db_column_text(&q, 1);
168168
rid = db_column_int(&q, 2);
169169
isDeleted = db_column_int(&q, 3);
170170
oldChnged = db_column_int(&q, 4);
171171
oldMtime = db_column_int64(&q, 6);
172
- if( !file_isfile(zName) && file_size(0)>=0 ){
172
+ if( isDeleted ){
173
+ chnged = 1;
174
+ }else if( !file_isfile(zName) && file_size(0)>=0 ){
173175
if( notFileIsFatal ){
174
- fossil_warning("not a ordinary file: %s", zName);
176
+ fossil_warning("not an ordinary file: %s", zName);
175177
nErr++;
176178
}
177179
chnged = 1;
178180
}else if( oldChnged>=2 ){
179181
chnged = oldChnged;
180
- }else if( isDeleted || rid==0 ){
182
+ }else if( rid==0 ){
181183
chnged = 1;
182184
}
183185
if( chnged!=1 ){
184186
currentMtime = file_mtime(0);
185187
assert( currentMtime>0 );
186188
--- src/vfile.c
+++ src/vfile.c
@@ -167,19 +167,21 @@
167 zName = db_column_text(&q, 1);
168 rid = db_column_int(&q, 2);
169 isDeleted = db_column_int(&q, 3);
170 oldChnged = db_column_int(&q, 4);
171 oldMtime = db_column_int64(&q, 6);
172 if( !file_isfile(zName) && file_size(0)>=0 ){
 
 
173 if( notFileIsFatal ){
174 fossil_warning("not a ordinary file: %s", zName);
175 nErr++;
176 }
177 chnged = 1;
178 }else if( oldChnged>=2 ){
179 chnged = oldChnged;
180 }else if( isDeleted || rid==0 ){
181 chnged = 1;
182 }
183 if( chnged!=1 ){
184 currentMtime = file_mtime(0);
185 assert( currentMtime>0 );
186
--- src/vfile.c
+++ src/vfile.c
@@ -167,19 +167,21 @@
167 zName = db_column_text(&q, 1);
168 rid = db_column_int(&q, 2);
169 isDeleted = db_column_int(&q, 3);
170 oldChnged = db_column_int(&q, 4);
171 oldMtime = db_column_int64(&q, 6);
172 if( isDeleted ){
173 chnged = 1;
174 }else if( !file_isfile(zName) && file_size(0)>=0 ){
175 if( notFileIsFatal ){
176 fossil_warning("not an ordinary file: %s", zName);
177 nErr++;
178 }
179 chnged = 1;
180 }else if( oldChnged>=2 ){
181 chnged = oldChnged;
182 }else if( rid==0 ){
183 chnged = 1;
184 }
185 if( chnged!=1 ){
186 currentMtime = file_mtime(0);
187 assert( currentMtime>0 );
188

Keyboard Shortcuts

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