# HG changeset patch # User Franz Glasner # Date 1743502505 -7200 # Node ID b3931b511ed09bc74f288715781137ade1483934 # Parent 4a8026cbcecf0a21508a1fc816e320da9596d37a Also encode TAB characters specially for output in digest files. Because with the new tabular output style we have the TAB character as column separator. diff -r 4a8026cbcecf -r b3931b511ed0 cutils/util/walk.py --- a/cutils/util/walk.py Tue Apr 01 11:20:22 2025 +0200 +++ b/cutils/util/walk.py Tue Apr 01 12:15:05 2025 +0200 @@ -151,11 +151,13 @@ if isinstance(what, bytes): s = (what.replace(b'\\', b"\\x5c") .replace(b'\n', b"\\x0a") - .replace(b'\r', b"\\x0d")) + .replace(b'\r', b"\\x0d") + .replace(b'\t', b"\\x09")) else: s = (what.replace(u'\\', u"\\x5c") .replace(u'\n', u"\\x0a") - .replace(u'\r', u"\\x0d")) + .replace(u'\r', u"\\x0d") + .replace(u'\t', u"\\x09")) if PY2: if isinstance(s, bytes): return s @@ -258,11 +260,13 @@ if isinstance(what, bytes): s = (what.replace(b'\\', b"\\x5c") .replace(b'\n', b"\\x0a") - .replace(b'\r', b"\\x0d")) + .replace(b'\r', b"\\x0d") + .replace(b'\t', b"\\x09")) else: s = (what.replace(u'\\', u"\\x5c") .replace(u'\n', u"\\x0a") - .replace(u'\r', u"\\x0d")) + .replace(u'\r', u"\\x0d") + .replace(u'\t', u"\\x09")) if PY2: if isinstance(s, bytes): try: