Bug 144133 - ark displays 9GB file inside a RAR archive as having 0bytes
Summary: ark displays 9GB file inside a RAR archive as having 0bytes
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Harald Hvaal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-12 12:29 UTC by Martin Koller
Modified: 2007-04-15 20:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Koller 2007-04-12 12:29:17 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Compiled From Sources
OS:                Linux

unrar l vm-20-06-02.rar

shows:

UNRAR 3.40 freeware      Copyright (c) 1993-2004 Alexander Roshal

Archive vm-20-06-02.rar

 Name             Size   Packed Ratio  Date   Time     Attr      CRC   Meth Ver
-------------------------------------------------------------------------------
 vmware-0.log    34296     6193  18% 28-03-07 11:36  .....A.   AF8D0605 m3g 2.9
 vmware-1.log    87450    10112  11% 28-03-07 11:33  .....A.   AB1CECBC m3g 2.9
 vmware-2.log    29965     5442  18% 27-03-07 12:47  .....A.   100FD833 m3g 2.9
 vmware.log      39656     6842  17% 28-03-07 11:39  .....A.   B49CDE0A m3g 2.9
 Windows XP Professional-000001.vmdk 1147076608 379662232  33% 28-03-07 11:38  .....A.   C2FA2813 m3g 2.9
 Windows XP Professional-000003.vmdk 45219840  9541560  21% 28-03-07 11:39  .....A.   A5D5C091 m3g 2.9
 windows xp professional-Snapshot6.vmem 536870912 144622058  26% 28-03-07 11:38  .....A.   C5517C56 m3g 2.9
 windows xp professional-Snapshot6.vmsn 17921118   358274   1% 28-03-07 11:38  .....A.   BEFA7496 m3g 2.9
 Windows XP Professional.nvram     8664      893  10% 28-03-07 11:39  .....A.   702CF287 m3g 2.9
 Windows XP Professional.vmdk 9771286528 3982950455  40% 28-03-07 09:26  .....A.   8F4E86DD m3g 2.9
 Windows XP Professional.vmsd     1382      401  29% 28-03-07 11:38  .....A.   694A708A m3g 2.9
 Windows XP Professional.vmx     1703      729  42% 28-03-07 11:38  .....A.   25744D75 m3g 2.9
 vm-20-06-02         0        0   0% 28-03-07 11:39  .D.....   00000000 m0  2.0
-------------------------------------------------------------------------------
   13      11518578122 4517165191  39%


but ark displays the largest file 'Windows XP Professional.vmdk' with "Size" and "Size Now" as "0 B"
Comment 1 Martin Koller 2007-04-15 20:18:53 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;