Merge lp://staging/~sao/unity-lens-files/ignore-hidden-files into lp://staging/unity-lens-files

Proposed by Oliver Sauder
Status: Merged
Merged at revision: 171
Proposed branch: lp://staging/~sao/unity-lens-files/ignore-hidden-files
Merge into: lp://staging/unity-lens-files
Diff against target: 23 lines (+10/-2)
1 file modified
src/daemon.vala (+10/-2)
To merge this branch: bzr merge lp://staging/~sao/unity-lens-files/ignore-hidden-files
Reviewer Review Type Date Requested Status
Mikkel Kamstrup Erlandsen (community) Approve
Review via email: mp+59299@code.staging.launchpad.net

Description of the change

Before files are appended to result model checking if there are not hidden.

To post a comment you must log in.
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

This looks mostly good. One catch though is that with the new check we stat() each file twice; first in g_file_query_exists() and then afterwards in g_file_query_info().

If you just drop the file.query_exists() clause and put a continue statement in the catch clause (removing the warning) I think we'll have equivalent behaviour as before while adding the hidden check to that, all still with one stat() only.

review: Needs Fixing
172. By Oliver Sauder

Optimized file hidden and exists test

Revision history for this message
Oliver Sauder (sao) wrote :

True. Adjusted the code as outlined. Did some testing and it seems to work just fine.

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Awesome. Thanks Oliver!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches