From 246f9f24a2a2b0ae9f00e6a8e51bc2f7fce3d3b5 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Mon, 2 May 2005 06:29:59 +0000 Subject: [PATCH] removed the extra line feed appended by asctime() --- lib/libalpm/add.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 0d109e4d..4290e9fc 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -393,9 +393,12 @@ int add_commit(pmtrans_t *trans, pmdb_t *db) } } - _alpm_log(PM_LOG_FLOW1, "updating database"); /* make an install date (in UTC) */ STRNCPY(info->installdate, asctime(gmtime(&t)), sizeof(info->installdate)); + /* remove the extra line feed appended by asctime() */ + info->installdate[strlen(info->installdate)-1] = 0; + + _alpm_log(PM_LOG_FLOW1, "updating database"); _alpm_log(PM_LOG_FLOW2, "adding database entry %s", info->name); if(db_write(db, info, INFRQ_ALL)) { _alpm_log(PM_LOG_ERROR, "could not update database entry %s/%s-%s", db->treename, info->name, info->version);