From cd62bfe191e9ee4a95cadef1306c03e19f40ef1e Mon Sep 17 00:00:00 2001 From: Russell Troxel Date: Sat, 9 Jul 2016 08:06:31 -0500 Subject: [PATCH] Fix Uploads to asciinema server. (#207) Thanks! --- bin/asciinema | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/asciinema b/bin/asciinema index cfa33c8..594d247 100755 --- a/bin/asciinema +++ b/bin/asciinema @@ -62,10 +62,17 @@ def playlog(fd, settings): if settings['colorify'] and color: sys.stdout.write(color) + # rtrox: While playback works properly + # with the asciinema client, upload + # causes mangling of the data due to + # newlines being misinterpreted without + # carriage returns. + data = data.replace("\n", "\r\n") + thedata = [sleeptime, data] thelog['duration'] = curtime stdout.append(thedata) - + if settings['colorify'] and color: sys.stdout.write(COLOR_RESET) color = None