From e7d20cf352688bf717a01f4e6d9e6f497c2bea4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 20 Sep 2025 19:19:34 +0200 Subject: New upstream version 5.3.1Beta2 --- app/bin/problemrep.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'app/bin/problemrep.c') diff --git a/app/bin/problemrep.c b/app/bin/problemrep.c index 6e23984..c508be4 100644 --- a/app/bin/problemrep.c +++ b/app/bin/problemrep.c @@ -48,6 +48,7 @@ #include "include/paramfilelist.h" #include "paths.h" #include "version.h" +#include "cundo.h" static void SaveSystemInfo(char* dir); static void ZipProblemData(const char* src); @@ -489,7 +490,9 @@ PickupLayoutFile(char* dir) char* lineptr = NULL; size_t linelen = 0; while (!feof(fhRead)) { - getline(&lineptr, &linelen, fhRead); + if ( getline(&lineptr, &linelen, fhRead) == -1 ) { + break; + }; if (!feof(fhRead)) { FilterLayoutLine(fhWrite, lineptr); } @@ -529,6 +532,31 @@ PickupCustomFile(char* dest) return(rc==0); } +/** + * Get the undo log file. + * + * \param dest temporary directory + * \return true on success + */ + +static bool +PickupUndoLog(char* dest) +{ + char* outFile; + + MakeFullpath(&outFile, dest, "command.log", NULL); + FILE * fDump = fopen( outFile, "w" ); + if ( fDump == NULL ) { + ProblemrepUpdateW(_("Get command log file FAILed: %s\n"), outFile); + free(outFile); + return false; + } + ProblemrepUpdateW(_("Get command log file %s\n"), outFile); + Rdump(fDump); + free(outFile); + return(true); +} + /** * Create a zip file from the collected information. The zip file is created * in the same directory as the layout design. A unique name is generated from @@ -617,6 +645,8 @@ ProblemDataCollect() free(subdirectory); subdirectory = NULL; + PickupUndoLog(tempDirectory); + if (ret) { ZipProblemData(tempDirectory); -- cgit v1.2.3