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

Emmanuel Pescosta emmanuelpescosta099 at gmail.com
Fri May 17 21:20:55 BST 2013


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

Ship it!


Works for me too, no regression found so far! Ship it ;)

- Emmanuel Pescosta


On May 14, 2013, 6:19 p.m., Frank Reininghaus wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110428/
> -----------------------------------------------------------
> 
> (Updated May 14, 2013, 6:19 p.m.)
> 
> 
> 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/20130517/5fcb0dbe/attachment.htm>


More information about the kfm-devel mailing list