Having random uuids seemed like a good idea, but there are several
situations where they really cause problems. One is merging dive file
imports from V2 logfiles. Another is testing such imports.
Instead of making the uuid random we now hash the name and add the
timestamp of the first dive associated with this dive site to the hash
(first in this context is "first encountered" with no guarantee that it is
the chronologically first). This way V2 imports create deterministic uuids
but uuid conflicts are still extremely unlikely, even if the user has
multiple dive sites with the same name.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Make precedence of && over || explicit.
Explicitly convert between char * and unsigned char *.
Don't assign potentially negative return code to an unsigend variable.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It's missing on Windows... we had this helper in liquivision.c but since I
used the function in git-access.c I figured I should just turn it into a
little helper.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since we do not currently handle buddy pressure properly, let's just
ignore that information for now. Unfortunately, this information is lost
in this case, but if we include it, the pressure graph is going to be
bogus.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Without the patch, there is a crash if the dive does not have a
location.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I was able to test against a v2.0 log file and fixed some
problems.
Also removed a file save that was being done for debug purposes.
Signed-off-by: John Van Ostrand <john@vanostrand.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
And added a missing liquivision item in file open dialog.
Signed-off-by: John Van Ostrand <john@vanostrand.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>