diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-09-20 19:19:41 +0200 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-09-20 19:19:41 +0200 | 
| commit | 63ec5715054be18ac4db5675e067b41c955d03b9 (patch) | |
| tree | 42bb5764b05bd3bc5bffadb55f4375e6dce8a521 /app/bin/problemrep.c | |
| parent | 6c1a798b0302034a7fdcaf93b8f014e2e458c2a0 (diff) | |
| parent | e7d20cf352688bf717a01f4e6d9e6f497c2bea4c (diff) | |
Update upstream source from tag 'upstream/5.3.1Beta2'
Update to upstream version '5.3.1Beta2'
with Debian dir 36e53756d97319b1944d0ea744717abc9326f697
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);  | 
