[sword-cvs] sword/src/mgr installmgr.cpp,1.16,1.17 swmgr.cpp,1.96,1.97
sword@www.crosswire.org
sword@www.crosswire.org
Thu, 15 Jan 2004 20:42:44 -0700
Update of /cvs/core/sword/src/mgr
In directory www:/tmp/cvs-serv22315/src/mgr
Modified Files:
installmgr.cpp swmgr.cpp
Log Message:
WINCE fixes
Index: installmgr.cpp
===================================================================
RCS file: /cvs/core/sword/src/mgr/installmgr.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- installmgr.cpp 25 Nov 2003 19:11:13 -0000 1.16
+++ installmgr.cpp 16 Jan 2004 03:42:41 -0000 1.17
@@ -250,7 +250,7 @@
modFile += "/";
modFile += fileBegin->second.c_str();
//remove file
- remove(modFile.c_str());
+ FileMgr::removeFile(modFile.c_str());
fileBegin++;
}
}
@@ -268,7 +268,7 @@
modFile = modDir;
modFile += "/";
modFile += ent->d_name;
- remove(modFile.c_str());
+ FileMgr::removeFile(modFile.c_str());
}
}
closedir(dir);
@@ -283,7 +283,7 @@
SWConfig *config = new SWConfig(modFile.c_str());
if (config->Sections.find(modName) != config->Sections.end()) {
delete config;
- remove(modFile.c_str());
+ FileMgr::removeFile(modFile.c_str());
}
else delete config;
}
@@ -367,14 +367,14 @@
buffer2 += (dirList[i].name);
preDownloadStatus(totalBytes, completedBytes, buffer2.c_str());
FileMgr::createParent(buffer.c_str()); // make sure parent directory exists
- try {
+ SWTRY {
SWBuf url = (SWBuf)"ftp://" + is->source + is->directory.c_str() + "/" + src + "/" + dirList[i].name; //dont forget the final slash
if (FTPURLGetFile(session, buffer.c_str(), url.c_str())) {
return -2;
}
completedBytes += dirList[i].size;
}
- catch (...) {}
+ SWCATCH (...) {}
if (terminate)
break;
}
@@ -383,20 +383,20 @@
}
else {
// Synchronize((TThreadMethod)&PreDownload2);
- try {
+ SWTRY {
SWBuf url = (SWBuf)"ftp://" + is->source + is->directory.c_str() + "/" + src; //dont forget the final slash
if (FTPURLGetFile(session, dest, url.c_str())) {
return -1;
}
}
- catch(...) {
+ SWCATCH (...) {
terminate = true;
}
}
- try {
+ SWTRY {
FTPCloseSession(session);
}
- catch(...){}
+ SWCATCH (...) {}
return 0;
}
@@ -461,7 +461,7 @@
fileBegin = module->second.lower_bound("File");
while (fileBegin != fileEnd) { // delete each tmp ftp file
buffer = sourceDir + "/" + fileBegin->second.c_str();
- remove(buffer.c_str());
+ FileMgr::removeFile(buffer.c_str());
fileBegin++;
}
}
@@ -521,7 +521,7 @@
modFile = sourceOrig + "/" + modDir;
modFile += "/";
modFile += ent->d_name;
- remove(modFile.c_str());
+ FileMgr::removeFile(modFile.c_str());
}
}
closedir(dir);
@@ -604,7 +604,7 @@
modFile = target;
modFile += "/";
modFile += ent->d_name;
- remove(modFile.c_str());
+ FileMgr::removeFile(modFile.c_str());
}
}
closedir(dir);
Index: swmgr.cpp
===================================================================
RCS file: /cvs/core/sword/src/mgr/swmgr.cpp,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- swmgr.cpp 5 Dec 2003 21:44:33 -0000 1.96
+++ swmgr.cpp 16 Jan 2004 03:42:41 -0000 1.97
@@ -1069,7 +1069,7 @@
}
}
AddModToConfig(conffd, newmodfile.c_str());
- unlink(newmodfile.c_str());
+ FileMgr::removeFile(newmodfile.c_str());
}
}
if (conffd > 0)