On 04/14/2011 05:39 PM, Colin Clark wrote:
> On 13/04/11 22:01, Colin Clark wrote:
>> On 10/04/11 17:51, stair wrote:
>>> I have recently starting using darktable for my raw processing and have
>>> come across a problem with the way geeqie groups darktable's xmp files, or
>>> rather doesn't, the files are not grouped
>>>
>>> when darktable creates it's sidecar files they are given the raw file full
>>> name including extension, in my case image.CR2, and adds the .xmp
>>> extension, so the sidecar is image.CR2.xmp.
>>>
>>> The only way I can get grouping to work is to change the sidecar file name
>>> to eliminate the .CR2 bit but this is not a solution since it breaks the
>>> connection in darktable.  Trying various things in the sidecar extensions
>>> list does not help
>>>
>>> I don't think I am missing something here, if so a pointer would be
>>> appreciated.  If not then it would be very good if this could be fixed
 >>
>> Hi
>>
>> I find that if I append ".CR2.xmp" to the sidecars extension list
>> (edit/preferences/preferences/files), then using right click on an image
>> set Disable File Grouping followed by Enable File Grouping -
>>
>> the .CR2.xmp files are then shown as grouped with the image.
>>
>> But this is not working correctly as the grouping is lost on re-start
>> and the file extensions of the sidecar files get corrupted when doing a
>> copy or move.
>>
>> So there is clearly a bug in this part of the code, but if this is
>> corrected it may be that you will get the functionality you are looking for.
>>
>> Colin Clark
>>
> Try changing line 761 of ui_fileops.c from
>
> return strrchr(path, '.');
>
> to
>
> return strchr(path, '.');
>
>
> I have no idea if that's a real solution to the problem - I'll have to
> leave that decision to someone who knows how Geeqie works.
>
>
> Colin Clark

I'm pretty sure that's not actually correct; it'll fail on any file that 
contains a period in the middle of the name.  The Correct (though 
probably a lot more computationally involved) solution is to consider a 
file as having some sequence of zero or more extensions, starting at the 
right edge of the filename.  If you recognize the rightmost N portions 
of that sequence, then you can identify the filetype.

In practice, you can find the last segment (with strrchr), and if that's 
".xmp" or something, do it again and see if the next segment looks like 
a recognizable file extension (".CR2" or somesuch).  It seems reasonable 
to only support two levels.

--xsdg

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Geeqie-devel mailing list
Geeqie-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geeqie-devel

Reply via email to