From: Mark Wooding Date: Sun, 7 Oct 2012 14:52:10 +0000 (+0100) Subject: fshash.in: Remove ambiguity for filenames containing ` -> '. X-Git-Tag: 0.99.1~2 X-Git-Url: https://git.distorted.org.uk/~mdw/rsync-backup/commitdiff_plain/8aeb0c535ad9f25a49755eaa05baace543094605 fshash.in: Remove ambiguity for filenames containing ` -> '. The problem is that we can't tell which occurrence is the separator for a symbolic link. Fix this by adding an otherwise pointless backslash. --- diff --git a/fshash.in b/fshash.in index 1dbd8be..b6aa4cf 100644 --- a/fshash.in +++ b/fshash.in @@ -348,7 +348,7 @@ class GenericFormatter (object): tm = T.gmtime(t) return T.strftime('%Y-%m-%dT%H:%M:%SZ', tm) def _enc_name(me, n): - return n.encode('string_escape') + return ' \\-> '.join(n.encode('string_escape').split(' -> ')) def name(me): return me._enc_name(me.fi.name) def info(me):