Review Request 110428: Prevent that changed files in expanded folders are shown with a size of 16 EiB

Frank Reininghaus frank78ac at googlemail.com
Tue May 14 19:19:54 BST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110428/
-----------------------------------------------------------

Review request for Dolphin.


Description
-------

Even though KFileItemModelRolesUpdater sets up dir watches only for directories (to update the number of items shown in the "Size" column and to update the "isExpandable" state), we receive dirty() signals from KDirWatch also for the files inside those directories if INotify is used (this is documented in the KDirWatch source).

This results in the problem that KFileItemModelRolesUpdater::slotDirWatchDirty(const QString& path) calls KFileItemModelRolesUpdater::subItemsCount(const QString& path) to count the items inside the file, which obviously fails. That function returns -1, indicating an error, but because the type in which file sizes are measured, KIO::filesize_t, is an unsigned 64 bit integer, this becomes 2^64-1, which is rounded to 16 EiB.

We can fix this easily by ignoring the dirty() signal for files.


This addresses bug 309740.
    http://bugs.kde.org/show_bug.cgi?id=309740


Diffs
-----

  dolphin/src/kitemviews/kfileitemmodelrolesupdater.cpp 39d01e2 

Diff: http://git.reviewboard.kde.org/r/110428/diff/


Testing
-------

Works. No regressions found so far.


Thanks,

Frank Reininghaus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20130514/8acb14a9/attachment.htm>


More information about the kfm-devel mailing list