diff options
author | Reuben Thomas <rrt@sc3d.org> | 2004-03-13 11:17:14 +0000 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2004-03-13 11:17:14 +0000 |
commit | db78f396f3de2c2c88ce27bc86751bc06f5c27ef (patch) | |
tree | 7f8eabc51cf3671e28c0c6a0560bdb28269e8bd7 | |
parent | f56da5d71083fe272ab42967bed01aa7d8e577d3 (diff) | |
download | plptools-db78f396f3de2c2c88ce27bc86751bc06f5c27ef.tar.gz plptools-db78f396f3de2c2c88ce27bc86751bc06f5c27ef.tar.bz2 plptools-db78f396f3de2c2c88ce27bc86751bc06f5c27ef.zip |
Fix some of the more egregious bugs in support for restarting
applications; this means that OPL apps can now be restarted.
-rw-r--r-- | plpbackup/plpbackup.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plpbackup/plpbackup.cc b/plpbackup/plpbackup.cc index 2e54021..6d8b0d0 100644 --- a/plpbackup/plpbackup.cc +++ b/plpbackup/plpbackup.cc @@ -289,21 +289,21 @@ startPrograms() { // If we got an error here, that happened probably because // we have no path at all (e.g. Macro5) and the program is // not registered in the Psion's path properly. Now try - // the ususal \System\Apps\<AppName>\<AppName>.app + // the usual \System\Apps\<AppName>\<AppName>.app // on all drives. if (cmd.find('\\') == cmd.npos) { u_int32_t devbits; if ((res = Rfsv->devlist(devbits)) == rfsv::E_PSI_GEN_NONE) { int i; for (i = 0; i < 26; i++) { - if (devbits & 1) { + if (devbits & (1 << i)) { ostringstream tmp; - tmp << 'A' + i << "\\System\\Apps\\" - << cmd << "\\" << cmd << ".app"; + tmp << (char)('A' + i) << ":\\System\\Apps\\" << + cmd << "\\" << cmd << ".app" << '\0'; res = Rpcs->execProgram(tmp.str().c_str(), ""); + if (res == rfsv::E_PSI_GEN_NONE) + break; } - if (res == rfsv::E_PSI_GEN_NONE) - break; } } } @@ -999,7 +999,7 @@ runRestore() u_int32_t sattr = e.getAttr() & mask; u_int32_t dattr = ~sattr & mask; int retry = 10; - // Retry, because file somtimes takes some time + // Retry, because file sometimes takes some time // to close; do { res = Rfsv->fsetattr(fn, sattr, dattr); |