| Summary: | ark displays 9GB file inside a RAR archive as having 0bytes | ||
|---|---|---|---|
| Product: | [Applications] ark | Reporter: | Martin Koller <martin> |
| Component: | general | Assignee: | Harald Hvaal <metellius> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | rakuco |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Martin Koller
2007-04-12 12:29:17 UTC
SVN commit 654281 by mkoller:
BUG: 144133
Store filesize as KIO::filesize_t instead of long to correctly
handle files > 4GB
M +9 -4 filelistview.cpp
M +4 -4 filelistview.h
--- branches/KDE/3.5/kdeutils/ark/filelistview.cpp #654280:654281
@@ -135,12 +135,12 @@
}
else if ( colName == sizeCol )
{
- m_fileSize = text.toLong();
+ m_fileSize = text.toULongLong();
QListViewItem::setText( column, KIO::convertSize( m_fileSize ) );
}
else if ( colName == packedStrCol )
{
- m_packedFileSize = text.toLong();
+ m_packedFileSize = text.toULongLong();
QListViewItem::setText( column, KIO::convertSize( m_packedFileSize ) );
}
else if ( colName == ratioStrCol )
@@ -156,8 +156,13 @@
}
else if ( colName == timeStampStrCol )
{
- m_timeStamp = QDateTime::fromString( text, ISODate );
- QListViewItem::setText( column, KGlobal::locale()->formatDateTime( m_timeStamp ) );
+ if ( text.isEmpty() )
+ QListViewItem::setText(column, text);
+ else
+ {
+ m_timeStamp = QDateTime::fromString( text, ISODate );
+ QListViewItem::setText( column, KGlobal::locale()->formatDateTime( m_timeStamp ) );
+ }
}
else
QListViewItem::setText(column, text);
--- branches/KDE/3.5/kdeutils/ark/filelistview.h #654280:654281
@@ -52,8 +52,8 @@
FileLVI( KListViewItem* lvi );
QString fileName() const { return m_entryName; }
- long fileSize() const { return m_fileSize; }
- long packedFileSize() const { return m_packedFileSize; }
+ KIO::filesize_t fileSize() const { return m_fileSize; }
+ KIO::filesize_t packedFileSize() const { return m_packedFileSize; }
double ratio() const { return m_ratio; }
QDateTime timeStamp() const { return m_timeStamp; }
@@ -62,8 +62,8 @@
virtual void setText( int column, const QString &text );
private:
- long m_fileSize;
- long m_packedFileSize;
+ KIO::filesize_t m_fileSize;
+ KIO::filesize_t m_packedFileSize;
double m_ratio;
QDateTime m_timeStamp;
QString m_entryName;
|