aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes/bug112334
-rw-r--r--src/common/util.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/changes/bug11233 b/changes/bug11233
new file mode 100644
index 0000000000..1161b6dfdf
--- /dev/null
+++ b/changes/bug11233
@@ -0,0 +1,4 @@
+ o Minor features:
+ - When we encounter an unexpected CR in text that we're trying to
+ write to a file on Windows, log the name of the file. Should help
+ diagnosing bug 11233.
diff --git a/src/common/util.c b/src/common/util.c
index 56235aa662..6524be3ed8 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -2004,7 +2004,8 @@ write_str_to_file(const char *fname, const char *str, int bin)
#ifdef _WIN32
if (!bin && strchr(str, '\r')) {
log_warn(LD_BUG,
- "We're writing a text string that already contains a CR.");
+ "We're writing a text string that already contains a CR to %s",
+ escaped(fname));
}
#endif
return write_bytes_to_file(fname, str, strlen(str), bin);