From: Oleg Broytman Date: Fri, 11 Aug 2023 19:51:49 +0000 (+0300) Subject: Fix(bin/recode_filenames.py): Decode new name X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=404d0179693007fe21b917ea0490bafd8b33bcf6;p=dotfiles.git Fix(bin/recode_filenames.py): Decode new name --- diff --git a/bin/recode_filenames.py b/bin/recode_filenames.py index ae2b50b..b8d3fa0 100755 --- a/bin/recode_filenames.py +++ b/bin/recode_filenames.py @@ -63,5 +63,7 @@ if __name__ == "__main__": import os for filename in sys.argv[3:]: new_name = _recode(filename) + if type(filename) is not type(new_name): + new_name = new_name.decode() if new_name != filename: os.rename(filename, new_name)