209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
|
#ifndef _WIN32
origPerm = db_column_int(&q, 8);
currentPerm = file_perm(zName, RepoFILE);
#endif
if( chnged==0 && (isDeleted || rid==0) ){
/* "fossil rm" or "fossil add" always change the file */
chnged = 1;
}else if( !file_isfile_or_link(0) && currentSize>=0 ){
if( cksigFlags & CKSIG_ENOTFILE ){
fossil_warning("not an ordinary file: %s", zName);
nErr++;
}
chnged = 1;
}
if( origSize!=currentSize ){
|
|
|
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
|
#ifndef _WIN32
origPerm = db_column_int(&q, 8);
currentPerm = file_perm(zName, RepoFILE);
#endif
if( chnged==0 && (isDeleted || rid==0) ){
/* "fossil rm" or "fossil add" always change the file */
chnged = 1;
}else if( !file_isfile_or_link(0, RepoFILE) && currentSize>=0 ){
if( cksigFlags & CKSIG_ENOTFILE ){
fossil_warning("not an ordinary file: %s", zName);
nErr++;
}
chnged = 1;
}
if( origSize!=currentSize ){
|
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
|
}else if( file_isdir(zPath, eFType)==1 ){
#endif
if( !vfile_top_of_checkout(zPath) ){
vfile_scan(pPath, nPrefix, scanFlags, pIgnore1, pIgnore2, eFType);
}
#ifdef _DIRENT_HAVE_D_TYPE
}else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
? (file_isfile_or_link(zPath)) : (pEntry->d_type==DT_REG) ){
#else
}else if( file_isfile_or_link(zPath) ){
#endif
if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){
db_bind_text(&ins, ":file", &zPath[nPrefix+1]);
if( scanFlags & SCAN_MTIME ){
db_bind_int(&ins, ":mtime", file_mtime(zPath, eFType));
}
if( scanFlags & SCAN_SIZE ){
|
|
|
|
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
|
}else if( file_isdir(zPath, eFType)==1 ){
#endif
if( !vfile_top_of_checkout(zPath) ){
vfile_scan(pPath, nPrefix, scanFlags, pIgnore1, pIgnore2, eFType);
}
#ifdef _DIRENT_HAVE_D_TYPE
}else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
? (file_isfile_or_link(zPath, eFType)) : (pEntry->d_type==DT_REG) ){
#else
}else if( file_isfile_or_link(zPath, eFType) ){
#endif
if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){
db_bind_text(&ins, ":file", &zPath[nPrefix+1]);
if( scanFlags & SCAN_MTIME ){
db_bind_int(&ins, ":mtime", file_mtime(zPath, eFType));
}
if( scanFlags & SCAN_SIZE ){
|
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
|
db_step(&ins);
db_reset(&ins);
fossil_free(zSavePath);
result += count; /* found X normal files? */
}
#ifdef _DIRENT_HAVE_D_TYPE
}else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
? (file_isfile_or_link(zPath)) : (pEntry->d_type==DT_REG) ){
#else
}else if( file_isfile_or_link(zPath) ){
#endif
db_bind_text(&upd, ":file", zOrigPath);
db_step(&upd);
db_reset(&upd);
result++; /* found 1 normal file */
}
fossil_path_free(zUtf8);
|
|
|
|
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
|
db_step(&ins);
db_reset(&ins);
fossil_free(zSavePath);
result += count; /* found X normal files? */
}
#ifdef _DIRENT_HAVE_D_TYPE
}else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
? (file_isfile_or_link(zPath, eFType)) : (pEntry->d_type==DT_REG) ){
#else
}else if( file_isfile_or_link(zPath, eFType) ){
#endif
db_bind_text(&upd, ":file", zOrigPath);
db_step(&upd);
db_reset(&upd);
result++; /* found 1 normal file */
}
fossil_path_free(zUtf8);
|