Fossil SCM
Fix a bug in "fossil rm". Ticket [15f8f4a4252]
Commit
fbcefb6e4ebd5b8e186f86c48adcbaace0e13a45
Parent
08c0a9ff0c4e7f2…
1 file changed
+5
-3
+5
-3
| --- src/vfile.c | ||
| +++ src/vfile.c | ||
| @@ -167,19 +167,21 @@ | ||
| 167 | 167 | zName = db_column_text(&q, 1); |
| 168 | 168 | rid = db_column_int(&q, 2); |
| 169 | 169 | isDeleted = db_column_int(&q, 3); |
| 170 | 170 | oldChnged = db_column_int(&q, 4); |
| 171 | 171 | 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 ){ | |
| 173 | 175 | if( notFileIsFatal ){ |
| 174 | - fossil_warning("not a ordinary file: %s", zName); | |
| 176 | + fossil_warning("not an ordinary file: %s", zName); | |
| 175 | 177 | nErr++; |
| 176 | 178 | } |
| 177 | 179 | chnged = 1; |
| 178 | 180 | }else if( oldChnged>=2 ){ |
| 179 | 181 | chnged = oldChnged; |
| 180 | - }else if( isDeleted || rid==0 ){ | |
| 182 | + }else if( rid==0 ){ | |
| 181 | 183 | chnged = 1; |
| 182 | 184 | } |
| 183 | 185 | if( chnged!=1 ){ |
| 184 | 186 | currentMtime = file_mtime(0); |
| 185 | 187 | assert( currentMtime>0 ); |
| 186 | 188 |
| --- 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 |