Update of /cvsroot/radmind/radmind
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv12588
Modified Files:
transcript.c
Log Message:
Do not checksum files that are going to be removed
Index: transcript.c
===================================================================
RCS file: /cvsroot/radmind/radmind/transcript.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -C2 -d -r1.114 -r1.115
*** transcript.c 17 Feb 2006 20:30:01 -0000 1.114
--- transcript.c 28 Sep 2006 18:55:52 -0000 1.115
***************
*** 218,221 ****
--- 218,222 ----
char *epath;
dev_t dev;
+ int print_minus = 0;
#ifdef __APPLE__
***************
*** 248,252 ****
if ( edit_path == APPLICABLE ) {
if ( flag == PR_FS_ONLY ) {
! fprintf( outtran, "- " );
cur = fs;
} else if ( flag == PR_STATUS_MINUS ) {
--- 249,253 ----
if ( edit_path == APPLICABLE ) {
if ( flag == PR_FS_ONLY ) {
! print_minus = 1;
cur = fs;
} else if ( flag == PR_STATUS_MINUS ) {
***************
*** 255,262 ****
} else if (( edit_path == CREATABLE ) &&
(( flag == PR_TRAN_ONLY ) || ( fs->pi_type == 'X' ))) {
! fprintf( outtran, "- " );
cur = &tran->t_pinfo;
}
if (( epath = encode( cur->pi_name )) == NULL ) {
fprintf( stderr, "Filename too long: %s\n", cur->pi_name );
--- 256,267 ----
} else if (( edit_path == CREATABLE ) &&
(( flag == PR_TRAN_ONLY ) || ( fs->pi_type == 'X' ))) {
! print_minus = 1;
cur = &tran->t_pinfo;
}
+ if ( print_minus ) {
+ fprintf( outtran, "- " );
+ }
+
if (( epath = encode( cur->pi_name )) == NULL ) {
fprintf( stderr, "Filename too long: %s\n", cur->pi_name );
***************
*** 315,321 ****
* it now. Note that this can only be the case if "cur" is the
* filesystem, because transcript_parse() won't read lines without
! * checksums if they are enabled.
*/
! if (( *cur->pi_cksum_b64 == '-' ) && cksum ) {
if ( cur->pi_type == 'f' ) {
if ( do_cksum( cur->pi_name, cur->pi_cksum_b64 ) < 0 ) {
--- 320,327 ----
* it now. Note that this can only be the case if "cur" is the
* filesystem, because transcript_parse() won't read lines without
! * checksums if they are enabled. But, don't get the checksum
! * if we are just going to remove the file.
*/
! if (( *cur->pi_cksum_b64 == '-' ) && cksum && !print_minus ) {
if ( cur->pi_type == 'f' ) {
if ( do_cksum( cur->pi_name, cur->pi_cksum_b64 ) < 0 ) {
|