On 13 October 2015 at 20:38, Dirk Hohndel <d...@hohndel.org> wrote: > 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? >
i don't think that the path creation should be per OS file i.e. in system_default_path_append(). should it? that function is more about path forming and retriaval, not path creation. once the path is retrieved in main.cpp, main.cpp or any later stage could create the path using the subsurface_mkdir() helper. also i assume this should work on Android as long as subsurface_mkdir() works there. lubomir -- _______________________________________________ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface