diff --git a/server/access-file.c b/server/access-file.c index 538768d..63139e6 100644 --- a/server/access-file.c +++ b/server/access-file.c @@ -1082,6 +1082,7 @@ access_zip_cb (evhtp_request_t *req, void *arg) json_t *info_obj = NULL; json_error_t jerror; char *filename = NULL; + char *repo_id = NULL; char *zip_file_path; const char *error = NULL; int error_code; @@ -1138,7 +1139,9 @@ access_zip_cb (evhtp_request_t *req, void *arg) zip_file_path = zip_download_mgr_get_zip_file_path (seaf->zip_download_mgr, token); if (!zip_file_path) { - seaf_warning ("Failed to get zip file path for %s, token:[%s].\n", filename, token); + g_object_get (info, "repo_id", &repo_id, NULL); + seaf_warning ("Failed to get zip file path for %s in repo %.8s, token:[%s].\n", + filename, repo_id, token); error = "Invalid token\n"; error_code = EVHTP_RES_BADREQ; goto out; @@ -1166,6 +1169,8 @@ out: json_decref (info_obj); if (filename) g_free (filename); + if (repo_id) + g_free (repo_id); if (error) { evbuffer_add_printf(req->buffer_out, "%s\n", error); diff --git a/server/pack-dir.c b/server/pack-dir.c index 7bf251f..fab7353 100644 --- a/server/pack-dir.c +++ b/server/pack-dir.c @@ -445,7 +445,8 @@ pack_files (const char *store_id, data = pack_dir_data_new (store_id, repo_version, dirname, crypt, is_windows); if (!data) { - seaf_warning ("Failed to create pack dir data.\n"); + seaf_warning ("Failed to create pack dir data for %s.\n", + strcmp (dirname, "")==0 ? "multi files" : dirname); return -1; } @@ -455,24 +456,25 @@ pack_files (const char *store_id, // Pack dir if (archive_dir (data, (char *)internal, "", progress) < 0) { if (progress->canceled) - seaf_warning ("Zip task for dir %s canceled.\n", dirname); + seaf_warning ("Zip task for dir %s in repo %.8s canceled.\n", dirname, store_id); else - seaf_warning ("Failed to archive dir %s.\n", dirname); + seaf_warning ("Failed to archive dir %s in repo %.8s.\n", dirname, store_id); ret = -1; } } else { // Pack multi if (archive_multi (data, (GList *)internal, progress) < 0) { if (progress->canceled) - seaf_warning ("Archiving multi files canceled.\n"); + seaf_warning ("Archiving multi files in repo %.8s canceled.\n", store_id); else - seaf_warning ("Failed to archive multi files.\n"); + seaf_warning ("Failed to archive multi files in repo %.8s.\n", store_id); ret = -1; } } if (archive_write_finish(data->a) < 0) { - seaf_warning ("Failed to archive write finish.\n"); + seaf_warning ("Failed to archive write finish for %s in repo %.8s.\n", + strcmp (dirname, "")==0 ? "multi files" : dirname, store_id); ret = -1; }