[sword-svn] r2270 - in trunk: src/mgr utilities
scribe at crosswire.org
scribe at crosswire.org
Tue Feb 24 06:22:08 MST 2009
Author: scribe
Date: 2009-02-24 06:22:08 -0700 (Tue, 24 Feb 2009)
New Revision: 2270
Modified:
trunk/src/mgr/installmgr.cpp
trunk/utilities/installmgr.cpp
Log:
Changed to use UID as tmp folder name
Fixed a bug to set user diclaimer ack before remote install
Modified: trunk/src/mgr/installmgr.cpp
===================================================================
--- trunk/src/mgr/installmgr.cpp 2009-02-24 06:48:40 UTC (rev 2269)
+++ trunk/src/mgr/installmgr.cpp 2009-02-24 13:22:08 UTC (rev 2270)
@@ -144,9 +144,9 @@
while (sourceBegin != sourceEnd) {
InstallSource *is = new InstallSource("FTP", sourceBegin->second.c_str());
sources[is->caption] = is;
- SWBuf parent = (SWBuf)privatePath + "/" + is->source + "/file";
+ SWBuf parent = (SWBuf)privatePath + "/" + is->uid + "/file";
FileMgr::createParent(parent.c_str());
- is->localShadow = (SWBuf)privatePath + "/" + is->source;
+ is->localShadow = (SWBuf)privatePath + "/" + is->uid;
sourceBegin++;
}
}
@@ -331,7 +331,7 @@
SWLog::getSystemLog()->logDebug("***** modName: %s \n", modName);
if (is)
- sourceDir = (SWBuf)privatePath + "/" + is->source;
+ sourceDir = (SWBuf)privatePath + "/" + is->uid;
else sourceDir = fromLocation;
removeTrailingSlash(sourceDir);
@@ -516,7 +516,7 @@
// assert user disclaimer has been confirmed
if (!isUserDisclaimerConfirmed()) return -1;
- SWBuf root = (SWBuf)privatePath + (SWBuf)"/" + is->source.c_str();
+ SWBuf root = (SWBuf)privatePath + (SWBuf)"/" + is->uid.c_str();
removeTrailingSlash(root);
SWBuf target = root + "/mods.d";
int errorCode = -1; //0 means successful
@@ -688,6 +688,8 @@
p = buf.stripPrefix('|', true);
uid = buf.stripPrefix('|', true);
+ if (!uid.length()) uid = source;
+
removeTrailingSlash(directory);
}
}
Modified: trunk/utilities/installmgr.cpp
===================================================================
--- trunk/utilities/installmgr.cpp 2009-02-24 06:48:40 UTC (rev 2269)
+++ trunk/utilities/installmgr.cpp 2009-02-24 13:22:08 UTC (rev 2270)
@@ -263,6 +263,9 @@
finish(-4);
}
module = it->second;
+
+ installMgr->setUserDisclaimerConfirmed(true);
+
int error = installMgr->installModule(mgr, 0, module->Name(), is);
if (error) {
cout << "Error installing module: [" << module->Name() << "] (write permissions?)\n";
More information about the sword-cvs
mailing list