Fixed: a workaround for timestamp bug in the QFileInfo.
This commit is contained in:
parent
2906aac9b1
commit
d2e214766b
2 changed files with 9 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
|||
######################################################################
|
||||
|
||||
TEMPLATE = lib
|
||||
CONFIG += staticlib qt warn_on release
|
||||
CONFIG += staticlib qt warn_on debug
|
||||
QT -= gui
|
||||
LIBS += -lz
|
||||
DEPENDPATH += .
|
||||
|
|
|
@ -12,12 +12,17 @@ QuaZipNewInfo::QuaZipNewInfo(const QString& name, const QString& file):
|
|||
name(name), internalAttr(0), externalAttr(0)
|
||||
{
|
||||
QFileInfo info(file);
|
||||
if(!info.exists()) dateTime=QDateTime::currentDateTime();
|
||||
else dateTime=info.lastModified();
|
||||
QDateTime lm = info.lastModified();
|
||||
if (!info.exists())
|
||||
dateTime = QDateTime::currentDateTime();
|
||||
else
|
||||
dateTime = lm;
|
||||
}
|
||||
|
||||
void QuaZipNewInfo::setFileDateTime(const QString& file)
|
||||
{
|
||||
QFileInfo info(file);
|
||||
if(info.exists()) dateTime=info.lastModified();
|
||||
QDateTime lm = info.lastModified();
|
||||
if (info.exists())
|
||||
dateTime = lm;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue