]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Better log message when writing a CR in text mode on windows
authorNick Mathewson <nickm@torproject.org>
Fri, 28 Mar 2014 03:48:17 +0000 (23:48 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 28 Mar 2014 03:48:17 +0000 (23:48 -0400)
Help to diagnose #11233

changes/bug11233 [new file with mode: 0644]
src/common/util.c

diff --git a/changes/bug11233 b/changes/bug11233
new file mode 100644 (file)
index 0000000..1161b6d
--- /dev/null
@@ -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.
index a0adb15ffe79a489e9986e28c313a1407c8bcceb..79e28601c94c02f235fe4d90d21b785d99570838 100644 (file)
@@ -2002,7 +2002,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);