PR #29 introduced the use of epicsStrPrintEscaped so that line breaks in strings would be handled correctly. Unfortunately, this introduced a bug (#48) that would cause save attempts to fail when the string to be written was empty.
This bug was fixed with d1e46a23ddad4bf01281b06d65021ed4a788a409 and 3d69b3d9387bcaa4953d5a4d44bae636c5cfba46, but this introduced an issue where Autosave would assume success, even if epicsStrPrintEscaped failed to write anything, not because the string was empty, but because fprintf failed or some reason.
This commit reintroduces the check whether epicsStrPrintEscaped has written anything, but it now correctly handles the case where epicsStrPrintEscaped does not write anything because the string that it is supposed to write is empty.
PR #29 introduced the use of
epicsStrPrintEscaped
so that line breaks in strings would be handled correctly. Unfortunately, this introduced a bug (#48) that would cause save attempts to fail when the string to be written was empty.This bug was fixed with d1e46a23ddad4bf01281b06d65021ed4a788a409 and 3d69b3d9387bcaa4953d5a4d44bae636c5cfba46, but this introduced an issue where Autosave would assume success, even if
epicsStrPrintEscaped
failed to write anything, not because the string was empty, but becausefprintf
failed or some reason.This commit reintroduces the check whether
epicsStrPrintEscaped
has written anything, but it now correctly handles the case whereepicsStrPrintEscaped
does not write anything because the string that it is supposed to write is empty.