Revision: 1186
http://geeqie.svn.sourceforge.net/geeqie/?rev=1186&view=rev
Author: zas_
Date: 2008-11-06 20:01:32 +0000 (Thu, 06 Nov 2008)
Log Message:
-----------
Previous patch (revision 1185) for the comments-related segfault was
incomplete, and as such, it broke keywords in files whose metadata had keywords
but no comments.
This patch fixes that (and still fixes the case where one searches on
comments and hits a file with keywords but no comments). Lastly, I would
imagine that there exists a failure mode where one searches for a keyword and
hits a file with a comment but no keyword, and I imagine this patch should fix
that case as well.
Patch by Omari Stephens (aka xsdg).
Revision Links:
--------------
http://geeqie.svn.sourceforge.net/geeqie/?rev=1185&view=rev
Modified Paths:
--------------
trunk/src/bar_info.c
Modified: trunk/src/bar_info.c
===================================================================
--- trunk/src/bar_info.c 2008-11-04 17:26:46 UTC (rev 1185)
+++ trunk/src/bar_info.c 2008-11-06 20:01:32 UTC (rev 1186)
@@ -463,8 +463,13 @@
if (res1 && (!comment || *comment != comment1)) g_free(comment1);
if (res2 && (!comment || *comment != comment2)) g_free(comment2);
- // return FALSE on failure
- if (comment && !*comment)
+ // return FALSE in the following cases:
+ // - only looking for a comment and didn't find one
+ // - only looking for keywords and didn't find any
+ // - looking for either a comment or keywords, but found nothing
+ if ((!keywords && comment && !*comment) ||
+ (!comment && keywords && !*keywords) ||
+ ( comment && !*comment && keywords && !*keywords))
return FALSE;
return TRUE;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn