diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-09-20 19:19:34 +0200 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-09-20 19:19:34 +0200 |
| commit | e7d20cf352688bf717a01f4e6d9e6f497c2bea4c (patch) | |
| tree | cfd2ef9b569f49af985a6f1ec44f2614f63c8e78 /app/bin/problemrep.c | |
| parent | a14a7a0ccc9de76aeab0b2e4bbf58f1a79deedc2 (diff) | |
New upstream version 5.3.1Beta2upstream/5.3.1Beta2
Diffstat (limited to 'app/bin/problemrep.c')
| -rw-r--r-- | app/bin/problemrep.c | 32 |
1 files changed, 31 insertions, 1 deletions
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); } @@ -530,6 +533,31 @@ PickupCustomFile(char* dest) } /** + * 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 * the current date and time. @@ -617,6 +645,8 @@ ProblemDataCollect() free(subdirectory); subdirectory = NULL; + PickupUndoLog(tempDirectory); + if (ret) { ZipProblemData(tempDirectory); |
