summaryrefslogtreecommitdiffstats
path: root/Lib/uu.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/uu.py')
-rwxr-xr-xLib/uu.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/uu.py b/Lib/uu.py
index 9b1e5e6..9f1f37f 100755
--- a/Lib/uu.py
+++ b/Lib/uu.py
@@ -73,6 +73,13 @@ def encode(in_file, out_file, name=None, mode=None, *, backtick=False):
name = '-'
if mode is None:
mode = 0o666
+
+ #
+ # Remove newline chars from name
+ #
+ name = name.replace('\n','\\n')
+ name = name.replace('\r','\\r')
+
#
# Write the data
#