[PATCH 1/1] Use ~/.subsurface as default directory on Linux

Dirk Hohndel dirk at hohndel.org
Tue Oct 13 10:38:43 PDT 2015


On Tue, Oct 13, 2015 at 10:10:08AM -0700, Dirk Hohndel wrote:
> 
> > cannot open "/home/mturkia/.subsurface/hashes"
> > ---8<---
> > 
> > The last line is the only one related to the change to .subsurface
> > directory. Apparently .subsurface is not created even though it is
> > used for something. This just makes me wonder what else might have to
> > be taken into account when changing the name of default directory. Or
> > is it even wise to switch for old users that already have everything
> > under the old dir.
> 
> The plot thickens - I was able to recreate this once... but I have a
> .subsurface directory so I guess then the hashes were written. I'll take a
> look if maybe the image hashing ends up failing silently if the directory
> isn't there or something?
> 
> Thanks for helping to track this down.

So I ran into two things that seem to be contributing to this.

a) we seem to not always make sure that the directory into which we are
trying to write things exists. The easiest way around this seems to simply
create our default directory. I did this for Linux and Mac. Instead of
needlessly breaking code... Lubomir, could you add this for Windows?
Anton, could you add this for Android?

b) we mark the divelist as changed even if the hash for a picture didn't
change

I just pushed two commits that should solve this (on Linux and Mac).

Robert, can you make sure that what I did to the hashes makes sense?

Miika, can you test that this fixes the problem you reported?

Thanks

/D


More information about the subsurface mailing list