Revision: 1841
http://geeqie.svn.sourceforge.net/geeqie/?rev=1841&view=rev
Author: nadvornik
Date: 2009-09-07 19:48:05 +0000 (Mon, 07 Sep 2009)
Log Message:
-----------
fixes sidecar file grouping
files with a number in extension were listed twice, it
caused problems later
Modified Paths:
--------------
trunk/src/filedata.c
Modified: trunk/src/filedata.c
===================================================================
--- trunk/src/filedata.c 2009-09-07 08:24:09 UTC (rev 1840)
+++ trunk/src/filedata.c 2009-09-07 19:48:05 UTC (rev 1841)
@@ -367,7 +367,7 @@
file_data_disconnect_sidecar_file(fd, sfd);
}
- if (sfd) file_data_check_sidecars(sfd, FALSE); /* this will
group the sidecars back together */
+ if (sfd) file_data_check_sidecars(sfd, NULL); /* this will
group the sidecars back together */
file_data_send_notification(fd, NOTIFY_REREAD);
}
else
@@ -444,7 +444,7 @@
GList *list = NULL;
sl = path_from_utf8(path);
-
+
extl = strrchr(sl, '.');
if (extl)
{
@@ -455,13 +455,25 @@
for (i = 0; i < (1 << ext_len); i++)
{
struct stat st;
+ gboolean skip = FALSE;
for (j = 0; j < ext_len; j++)
{
if (i & (1 << (ext_len - 1 - j)))
+ {
extl[j] = g_ascii_tolower(extl[j]);
+ /* make sure the result does not
contain duplicates */
+ if (extl[j] == g_ascii_toupper(extl[j]))
+ {
+ /* no change, probably a
number, we have already tested this combination */
+ skip = TRUE;
+ break;
+ }
+ }
else
extl[j] = g_ascii_toupper(extl[j]);
}
+ if (skip) continue;
+
if (stat(sl, &st) == 0)
{
list = g_list_prepend(list,
file_data_new_local(sl, &st, FALSE, FALSE));
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn