[Digikam-devel] UndoCache disk space issues

Gilles Caulier caulier.gilles at gmail.com
Mon Aug 16 10:54:27 BST 2010


2010/8/16 Martin Klapetek <martin.klapetek at gmail.com>:
>
> On Mon, Aug 16, 2010 at 07:30, Andi Clemens <andi.clemens at gmx.net> wrote:
>>
>> This is the issue: You don't know if another instance of digiKam is
>> running.
>> In the past I also just wanted to remove the undo-cache, but other running
>> instances were effected.
>
> The cache file is in format "undocache-PID-n.bin" where the n is INT and
> probably means number of the cache file for the given PID. So if we know PID
> which created the cache, we should be able to just find out, if there is
> such process running, no? And if no, then delete it.

yes, it can be do like this. to get current process info, it's easy :

http://lxr.kde.org/source/extragear/graphics/digikam/utilities/cameragui/cameracontroller.cpp#507

... using getpid() from #include <unistd.h> which work also under win32

>>
>> On Sunday 15 August 2010 23:56:54 Michael G. Hansen wrote:
>> >
>> > Would it be possible to instead re-load the undo cache and continue
>> > editing the picture?
>
> Hmm...the cache itself is quite useless, it's only the image data for fast
> image switching with undo/redo, but it doesn't contain the actual info about
> the undo/redo operations, opened file etc. So the file is useless for new
> running instance.

this can be hosted in bin data as metadata using XML format

Gilles



More information about the Digikam-devel mailing list