Fossil SCM
Fix a bug in file change detection introduced by check-in [d7a583e697]. Don't use that check-in, nor [30f23e3f5c].
Commit
1abc8a940ee2ef715ee654c67e965e2cba0c7c71
Parent
30f23e3f5cf7907…
2 files changed
+1
+1
+1
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -45,10 +45,11 @@ | ||
| 45 | 45 | static int getStat(const char *zFilename){ |
| 46 | 46 | if( zFilename==0 ){ |
| 47 | 47 | if( fileStatValid==0 ) return 1; |
| 48 | 48 | }else{ |
| 49 | 49 | if( stat(zFilename, &fileStat)!=0 ) return 1; |
| 50 | + fileStatValid = 1; | |
| 50 | 51 | } |
| 51 | 52 | return 0; |
| 52 | 53 | } |
| 53 | 54 | |
| 54 | 55 | |
| 55 | 56 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -45,10 +45,11 @@ | |
| 45 | static int getStat(const char *zFilename){ |
| 46 | if( zFilename==0 ){ |
| 47 | if( fileStatValid==0 ) return 1; |
| 48 | }else{ |
| 49 | if( stat(zFilename, &fileStat)!=0 ) return 1; |
| 50 | } |
| 51 | return 0; |
| 52 | } |
| 53 | |
| 54 | |
| 55 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -45,10 +45,11 @@ | |
| 45 | static int getStat(const char *zFilename){ |
| 46 | if( zFilename==0 ){ |
| 47 | if( fileStatValid==0 ) return 1; |
| 48 | }else{ |
| 49 | if( stat(zFilename, &fileStat)!=0 ) return 1; |
| 50 | fileStatValid = 1; |
| 51 | } |
| 52 | return 0; |
| 53 | } |
| 54 | |
| 55 | |
| 56 |
+1
| --- src/vfile.c | ||
| +++ src/vfile.c | ||
| @@ -180,10 +180,11 @@ | ||
| 180 | 180 | }else if( isDeleted || rid==0 ){ |
| 181 | 181 | chnged = 1; |
| 182 | 182 | } |
| 183 | 183 | if( chnged!=1 ){ |
| 184 | 184 | currentMtime = file_mtime(0); |
| 185 | + assert( currentMtime>0 ); | |
| 185 | 186 | } |
| 186 | 187 | if( chnged!=1 && (checkMtime==0 || currentMtime!=oldMtime) ){ |
| 187 | 188 | db_ephemeral_blob(&q, 5, &origCksum); |
| 188 | 189 | if( sha1sum_file(zName, &fileCksum) ){ |
| 189 | 190 | blob_zero(&fileCksum); |
| 190 | 191 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -180,10 +180,11 @@ | |
| 180 | }else if( isDeleted || rid==0 ){ |
| 181 | chnged = 1; |
| 182 | } |
| 183 | if( chnged!=1 ){ |
| 184 | currentMtime = file_mtime(0); |
| 185 | } |
| 186 | if( chnged!=1 && (checkMtime==0 || currentMtime!=oldMtime) ){ |
| 187 | db_ephemeral_blob(&q, 5, &origCksum); |
| 188 | if( sha1sum_file(zName, &fileCksum) ){ |
| 189 | blob_zero(&fileCksum); |
| 190 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -180,10 +180,11 @@ | |
| 180 | }else if( isDeleted || rid==0 ){ |
| 181 | chnged = 1; |
| 182 | } |
| 183 | if( chnged!=1 ){ |
| 184 | currentMtime = file_mtime(0); |
| 185 | assert( currentMtime>0 ); |
| 186 | } |
| 187 | if( chnged!=1 && (checkMtime==0 || currentMtime!=oldMtime) ){ |
| 188 | db_ephemeral_blob(&q, 5, &origCksum); |
| 189 | if( sha1sum_file(zName, &fileCksum) ){ |
| 190 | blob_zero(&fileCksum); |
| 191 |