Cloud storage and web view

Dirk Hohndel dirk at hohndel.org
Mon Jun 22 05:46:07 PDT 2015


Hi Jan,

as discussed on IRC, here's a quick patch, just to get some idea on what's
going wrong for you...

Save it somewhere and apply it with 
patch -p1 < /tmp/diff
rebuild and run Subsurface, make a small change and save to the cloud
again
then please send me the stderr output

Thanks

/D
-------------- next part --------------
diff --git a/save-git.c b/save-git.c
index 1914a07eed78..3fbfa6a923c8 100644
--- a/save-git.c
+++ b/save-git.c
@@ -564,8 +564,10 @@ static int blob_insert_fromdisk(git_repository *repo, struct dir *tree, const ch
 	git_oid blob_id;
 
 	ret = git_blob_create_fromdisk(&blob_id, repo, filepath);
-	if (ret)
+	if (ret) {
+		fprintf(stderr, "error when inserting the blob\n");
 		return ret;
+	}
 	return tree_insert(tree->files, filename, 1, &blob_id, GIT_FILEMODE_BLOB);
 }
 
@@ -624,13 +626,16 @@ static int save_one_picture(git_repository *repo, struct dir *dir, struct pictur
 	offset -= h *3600;
 	error = blob_insert(repo, dir, &buf, "%c%02u=%02u=%02u",
 		sign, h, FRACTION(offset, 60));
+	fprintf(stderr, "stored picture information for %s, error code %d\n", pic->filename, error);
 	if (!error) {
 		/* next store the actual picture; we prefix all picture names
 		 * with "PIC-" to make things easier on the parsing side */
 		struct membuffer namebuf = { 0 };
 		const char *localfn = local_file_path(pic);
+		fprintf(stderr, "based on the hashes, the actual file is at %s\n", localfn);
 		put_format(&namebuf, "PIC-%s", pic->hash);
 		error = blob_insert_fromdisk(repo, dir, localfn, mb_cstring(&namebuf));
+		fprintf(stderr, "inserted the picture as %s, error code %d\n", mb_cstring(&namebuf), error);
 		free((void *)localfn);
 	}
 	return error;


More information about the subsurface mailing list