[Nepomuk] Review Request 108985: Filewatch: do not try to watch empty paths

Vishesh Handa me at vhanda.in
Sat Feb 16 19:23:53 UTC 2013


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

Ship it!


In case you don't know it, you're awesome! I've been trying to figure this out for quite some time.

- Vishesh Handa


On Feb. 16, 2013, 7:07 p.m., Simeon Bird wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108985/
> -----------------------------------------------------------
> 
> (Updated Feb. 16, 2013, 7:07 p.m.)
> 
> 
> Review request for Nepomuk and Vishesh Handa.
> 
> 
> Description
> -------
> 
> Filewatch: do not try to watch empty paths.
> 
> In slotDeviceMounted, we find the mountPath to watch using
> entry->MountPath. However, if the removable device could not be viewed as
> a Solid::DeviceType::StorageAccess, mountPath returns QString().
> 
> We would then try to watch an empty folder.
> In shouldFolderBeWatched we would try to split the empty string,
> resulting in an empty list, and take the last component of this list,
> leading to an invalid pointer and a crash.
> 
> The fix is two-fold:
> First, check for empty mountPath in slotDeviceMounted and do not try to
> watch it.
> Second, check that the split path is not empty in shouldFolderBeWatched
> before taking the last component.
> 
> BUG: 312423
> FIXED-IN: 4.10.1
> 
> 
> This addresses bug 312423.
>     http://bugs.kde.org/show_bug.cgi?id=312423
> 
> 
> Diffs
> -----
> 
>   services/fileindexer/fileindexerconfig.cpp 13a14cfeb8dfe715301d912c78adeb691482c6b0 
>   services/filewatch/nepomukfilewatch.cpp 392f31d88a534cc69245f6d09e73e7838f6ca148 
> 
> Diff: http://git.reviewboard.kde.org/r/108985/diff/
> 
> 
> Testing
> -------
> 
> Compile only
> 
> 
> Thanks,
> 
> Simeon Bird
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20130216/86d76e05/attachment.html>


More information about the Nepomuk mailing list