From a2afbd3ea3cc8bcf946c018608d5c371aa17660b Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Fri, 10 Apr 2009 15:06:19 +0000 Subject: [PATCH] Unlink temp file on error --- src/settings.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/settings.c b/src/settings.c index eab2cd63..5fffae07 100644 --- a/src/settings.c +++ b/src/settings.c @@ -149,6 +149,8 @@ hts_settings_save(htsmsg_t *record, const char *pathfmt, ...) if(ok) rename(fullpath, fullpath2); + else + unlink(fullpath); htsbuf_queue_flush(&hq); }