mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
Typo in copyright
use QFile in db.cpp fix path in xca.nsi
This commit is contained in:
parent
ce806906ed
commit
aaf8cae7e4
@ -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
|
||||
|
||||
37
lib/db.cpp
37
lib/db.cpp
@ -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;
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user