From 6ae4baa77b6f411c826bceda4c6f29a43291dedf Mon Sep 17 00:00:00 2001 From: Elliot Nunn Date: Thu, 19 Aug 2021 21:07:40 +0800 Subject: [PATCH] Hack to dump Shift-JIS filenames --- machfs/directory.py | 1 + 1 file changed, 1 insertion(+) diff --git a/machfs/directory.py b/machfs/directory.py index ad8d421..11a7364 100644 --- a/machfs/directory.py +++ b/machfs/directory.py @@ -264,6 +264,7 @@ class AbstractFolder(MutableMapping): alias_fixups = list() valid_alias_targets = dict() for p, obj in self.iter_paths(): + p = [element.encode("mac_roman").decode("shift_jis") for element in p] blacklist_test = ':'.join(p) + ':' if blacklist_test.startswith(tuple(blacklist)): continue if _unsyncability(p[-1]):