Typo in copyright

use QFile in db.cpp
fix path in xca.nsi
This commit is contained in:
Christian 2006-12-29 14:04:58 +01:00
parent ce806906ed
commit aaf8cae7e4
4 changed files with 21 additions and 23 deletions

View File

@ -33,7 +33,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This program links to software with different licenses from:
http://www.openssl.orgwhich includes cryptographic software
http://www.openssl.org which includes cryptographic software
written by Eric Young (eay@cryptsoft.com)"
http://www.trolltech.com

View File

@ -314,13 +314,13 @@ int db::erase(void)
int db::shrink(int flags)
{
int fdn, ret;
int ret;
uint32_t offs;
char buf[BUFSIZ];
QFile new_file;
QString filename = name + "{new}";
fdn = open(CCHAR(filename), O_RDWR | O_CREAT, 0644);
if (fdn<0) {
new_file.setFileName(name + "{new}");
if (!new_file.open(QIODevice::ReadWrite)) {
fileIOerr("open");
return 1;
}
@ -339,16 +339,15 @@ int db::shrink(int flags)
break;
continue;
}
ret = write(fdn, &head, sizeof(head));
if (ret<0)
ret = new_file.write((char*)&head, sizeof(head));
if (ret != sizeof(head))
break;
offs = head_offset;
while (offs) {
ret = file.read((char*)buf, (offs > BUFSIZ) ? BUFSIZ : offs);
if (ret<=0)
break;
ret = write(fdn, buf, ret);
if (ret<0)
if (new_file.write(buf, ret) != ret)
break;
offs -= ret;
}
@ -356,29 +355,29 @@ int db::shrink(int flags)
break;
}
close(fdn);
new_file.close();
if (ret) {
unlink(CCHAR(filename));
unlink(CCHAR(new_file.fileName()));
return 1;
}
file.close();
// use the global rename() function and not the method of this class
#ifdef WIN32
// here we try to reimplement the simple "mv" command on unix
// atomic renaming fails on WIN32 platforms and
// forces us to work with temporary files :-(
QString tempn = "$" + name + "orig";
unlink(CCHAR(tempn));
if (!::rename(CCHAR(name), CCHAR(tempn))) {
if (!::rename(CCHAR(filename), CCHAR(name))) {
unlink(CCHAR(tempn));
QString tempn = name + "{orig}";
QFile::remove(tempn);
if (file.rename(tempn)) {
if (new_file.rename(name)) {
QFile::remove(tempn);
} else {
::rename(CCHAR(tempn), CCHAR(name));
unlink(CCHAR(filename));
QFile::rename(tempn, name);
QFile::remove(new_file.fileName());
}
}
#else
::rename(CCHAR(filename), CCHAR(name));
// use the global rename() function and not the method of this class
::rename(CCHAR(new_file.fileName()), CCHAR(name));
#endif
return 0;
}

View File

@ -257,7 +257,6 @@ pki_crl *db_crl::newItem(pki_x509 *cert)
crl->sign(cert->getRefKey(), dgst);
mainwin->certs->updatePKI(cert);
#warning FIXME: set Last update
insert(crl);
}
catch (errorEx &err) {

View File

@ -69,8 +69,8 @@ Section "xca (required)" SecMain
File "${BDIR}/mingwm10.dll"
File "${OPENSSL}\libeay32.dll"
File "${QTDIR}\QtGui4.dll"
File "${QTDIR}\QtCore4.dll"
File "${QTDIR}\bin\QtGui4.dll"
File "${QTDIR}\bin\QtCore4.dll"
; remove old images
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\xca "Install_Dir" "$INSTDIR"