aboutsummaryrefslogtreecommitdiffstats
path: root/kde2
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2002-03-16 23:10:52 +0000
committerFritz Elfert <felfert@to.com>2002-03-16 23:10:52 +0000
commit193af441a127a0daabbd17c512e34817ddbcadfd (patch)
treedeef4cbfdf258ae3c7d8cde2b43a611520f73632 /kde2
parent7121719ec7f473c3d26873d688179a7d7f466026 (diff)
downloadplptools-193af441a127a0daabbd17c512e34817ddbcadfd.tar.gz
plptools-193af441a127a0daabbd17c512e34817ddbcadfd.tar.bz2
plptools-193af441a127a0daabbd17c512e34817ddbcadfd.zip
- ncpd now works with both Series 3 and Series 5
- ncpd now has autobaud feature (default on), which cycles baudrate - lib: added getSpeed() for retrieving current speed of connection - plpftp: Use getSpeed() - plpbackup: Ongoing work - configure stuff: removed several entries from acconfig.h comments now defined as 3rd arg to AC_DEFINE...
Diffstat (limited to 'kde2')
-rw-r--r--kde2/kpsion/kpsion.cpp71
1 files changed, 41 insertions, 30 deletions
diff --git a/kde2/kpsion/kpsion.cpp b/kde2/kpsion/kpsion.cpp
index e6a8d4d..6ba36a7 100644
--- a/kde2/kpsion/kpsion.cpp
+++ b/kde2/kpsion/kpsion.cpp
@@ -864,37 +864,49 @@ doBackup() {
u_int32_t handle;
kapp->processEvents();
- res = plpRfsv->fopen(plpRfsv->opMode(rfsv::PSI_O_RDONLY), fn,
- handle);
- if (res != rfsv::E_PSI_GEN_NONE) {
- if (KMessageBox::warningYesNo(this, i18n("<QT>Could not open<BR/><B>%1</B></QT>").arg(fn)) == KMessageBox::No) {
- badBackup = true;
- break;
- } else {
- e.setName("!");
- continue;
- }
- }
- unsigned char *buff = new unsigned char[RFSV_SENDLEN];
- u_int32_t len;
+ bool tryLoop = true;
do {
- if ((res = plpRfsv->fread(handle, buff, RFSV_SENDLEN, len)) ==
- rfsv::E_PSI_GEN_NONE) {
- os.writeRawBytes((char *)buff, len);
- updateProgress(len);
+ res = plpRfsv->fopen(plpRfsv->opMode(rfsv::PSI_O_RDONLY), fn,
+ handle);
+ if (res == rfsv::E_PSI_GEN_NONE) {
+ unsigned char *buff = new unsigned char[RFSV_SENDLEN];
+ u_int32_t len;
+ do {
+ if ((res = plpRfsv->fread(handle, buff, RFSV_SENDLEN,
+ len)) == rfsv::E_PSI_GEN_NONE) {
+ os.writeRawBytes((char *)buff, len);
+ updateProgress(len);
+ }
+ } while ((len > 0) && (res == rfsv::E_PSI_GEN_NONE));
+ delete[]buff;
+ plpRfsv->fclose(handle);
}
- } while ((len > 0) && (res == rfsv::E_PSI_GEN_NONE));
- delete[]buff;
- plpRfsv->fclose(handle);
- if (res != rfsv::E_PSI_GEN_NONE) {
- if (KMessageBox::warningYesNo(this, i18n("<QT>Could not read<BR/><B>%1</B></QT>").arg(fn)) == KMessageBox::No) {
- badBackup = true;
- break;
+ if (res != rfsv::E_PSI_GEN_NONE) {
+ switch (KMessageBox::warningYesNoCancel(
+ this, i18n(
+ "<QT>Could not backup<BR/><B>%1</B><BR/>"
+ "<FONT COLOR=RED>%2</FONT><BR/></QT>"
+ ).arg(fn).arg((const char *)res),
+ QString::null, i18n("Retry"), i18n("Ignore"))) {
+ case KMessageBox::Cancel:
+ badBackup = true;
+ tryLoop = false;
+ break;
+ case KMessageBox::No:
+ e.setName("!");
+ tryLoop = false;
+ break;
+ case KMessageBox::Yes:
+ break;
+ }
} else {
- e.setName("!");
- continue;
+ tryLoop = false;
}
- }
+ } while (tryLoop);
+ if (badBackup)
+ break;
+ if (res != rfsv::E_PSI_GEN_NONE)
+ continue;
backupTgz->writeFile(unixname, "root", "root", ba.size(), ba.data());
}
@@ -915,7 +927,7 @@ doBackup() {
kapp->processEvents();
res = plpRfsv->fsetattr(fn, 0, rfsv::PSI_A_ARCHIVE);
if (res != rfsv::E_PSI_GEN_NONE) {
- if (KMessageBox::warningYesNo(this, i18n("<QT>Could not set attributes of<BR/><B>%1</B></QT>").arg(fn)) == KMessageBox::No) {
+ if (KMessageBox::warningYesNo(this, i18n("<QT>Could not set attributes of<BR/><B>%1</B><BR/><FONT COLOR=red>%2</FONT><BR/>Continue?</QT>").arg(fn)) == KMessageBox::No) {
break;
}
}
@@ -998,7 +1010,6 @@ removeOldBackups(QStringList &drives) {
QFileInfoListIterator it(*fil);
QFileInfo *fi;
ArchList alist;
- Barchive *a;
// Build a list of full-backups sorted by date
while ((fi = it.current())) {
@@ -1637,7 +1648,7 @@ killSave() {
"<QT>Could not stop all processes.<BR/>"
"Please stop running programs manually on the Psion, "
"then klick <B>Ok</B>."));
- time_t tstart = time(0) + 5;
+ tstart = time(0) + 5;
}
}
return;