From b02bf002a677e45dbaa4d28edadbaafc89a7badc Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Thu, 26 Feb 2015 14:39:42 +0100 Subject: Add hashes to images Upon successfull reading an image file, this computes a SHA1 hash of the image and saves it with the picture tag in the log file. When a file is not successfully loaded (for example because the log was created on a different computer) we look up the hash in a dictionary that maps hashes to local file names. That dictionary (actually two for both directions), is loaded on startup and saved upon destruction of the main window. Signed-off-by: Robert C. Helling Signed-off-by: Dirk Hohndel --- save-git.c | 1 + 1 file changed, 1 insertion(+) (limited to 'save-git.c') diff --git a/save-git.c b/save-git.c index 0125f64d7..a7b51446a 100644 --- a/save-git.c +++ b/save-git.c @@ -585,6 +585,7 @@ static int save_one_picture(git_repository *repo, struct dir *dir, struct pictur show_utf8(&buf, "filename ", pic->filename, "\n"); show_gps(&buf, pic->latitude, pic->longitude); + show_utf8(&buf, "hash ", pic->hash, "\n"); /* Picture loading will load even negative offsets.. */ if (offset < 0) { -- cgit v1.2.3-70-g09d2