Summary: | Backup conduit does not skip database creators per documentation | ||
---|---|---|---|
Product: | [Unmaintained] kpilot | Reporter: | Jason 'vanRijn' Kasper <vR> |
Component: | General | Assignee: | groot |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | fix for kpilot backup not correctly skipping creators |
Description
Jason 'vanRijn' Kasper
2005-02-23 20:43:34 UTC
Found it. Off by 1 position twice. =:) Will attach the diff to fix it. Created attachment 9806 [details]
fix for kpilot backup not correctly skipping creators
CVS commit by vanrijn: - fix for off-by-one-twice bug that was keeping requested databases from being skipped BUGS:100114 CCBUGS:100114 M +5 -4 hotSync.cc 1.53 --- kdepim/kpilot/kpilot/hotSync.cc #1.52:1.53 @@ -213,5 +213,5 @@ static inline void initNoBackup(QStringL else { - QCString data = s.mid(2,4).latin1(); + QCString data = s.mid(1,4).latin1(); unsigned long creator = pi_mktag(data[0],data[1],data[2],data[3]); dbcreators.append(creator); @@ -368,8 +368,9 @@ bool BackupAction::checkBackupDirectory( char buff[8]; + memset(buff, 0, 8); buff[0] = '['; set_long( &buff[1], info.creator ); - buff[6] = ']'; - buff[7] = '\0'; + buff[5] = ']'; + buff[6] = '\0'; QString creator = QString::fromLatin1( buff ); info.name[33]='\0'; CVS commit by vanrijn: - fix for off-by-one-twice bug that was keeping requested databases from being skipped BUGS:100114 CCBUGS:100114 M +5 -4 hotSync.cc 1.53 --- kdepim/kpilot/kpilot/hotSync.cc #1.52:1.53 @@ -213,5 +213,5 @@ static inline void initNoBackup(QStringL else { - QCString data = s.mid(2,4).latin1(); + QCString data = s.mid(1,4).latin1(); unsigned long creator = pi_mktag(data[0],data[1],data[2],data[3]); dbcreators.append(creator); @@ -368,8 +368,9 @@ bool BackupAction::checkBackupDirectory( char buff[8]; + memset(buff, 0, 8); buff[0] = '['; set_long( &buff[1], info.creator ); - buff[6] = ']'; - buff[7] = '\0'; + buff[5] = ']'; + buff[6] = '\0'; QString creator = QString::fromLatin1( buff ); info.name[33]='\0'; |