Differences From:
File
src/vfile.c
part of check-in
[d861fe77fb]
- If a file in the check-out is changed to something other than a file
(like a directory) then raise an error when checking file signatures.
Also fix a problem with the new multi-file "revert" command and add
some comments to "update".
by
drh on
2009-12-17 18:47:14.
[view]
To:
File
src/vfile.c
part of check-in
[76f169fca6]
- Detect when the check-out contains missing files and filesystem objects that
ought to be files but are not. Issue reasonable warnings.
by
drh on
2009-12-18 00:29:51.
Also file
src/vfile.c
part of check-in
[76bc05d739]
- merge with trunk
by
btheado on
2009-12-30 20:33:59.
[view]
@@ -143,9 +143,9 @@
**
** If VFILE.DELETED is null or if VFILE.RID is zero, then we can assume
** the file has changed without having the check the on-disk image.
*/
-void vfile_check_signature(int vid){
+void vfile_check_signature(int vid, int notFileIsFatal){
int nErr = 0;
Stmt q;
Blob fileCksum, origCksum;
int checkMtime = db_get_boolean("mtime-changes", 0);
@@ -169,13 +169,14 @@
isDeleted = db_column_int(&q, 3);
oldChnged = db_column_int(&q, 4);
oldMtime = db_column_int64(&q, 6);
if( !file_isfile(zName) && file_size(zName)>=0 ){
- fossil_warning("not a ordinary file: %s", zName);
- nErr++;
- continue;
- }
- if( oldChnged>=2 ){
+ if( notFileIsFatal ){
+ fossil_warning("not a ordinary file: %s", zName);
+ nErr++;
+ }
+ chnged = 1;
+ }else if( oldChnged>=2 ){
chnged = oldChnged;
}else if( isDeleted || rid==0 ){
chnged = 1;
}