]> git.phdru.name Git - dotfiles.git/commitdiff
Fix(bin/recode_filenames.py): Decode new name
authorOleg Broytman <phd@phdru.name>
Fri, 11 Aug 2023 19:51:49 +0000 (22:51 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 11 Aug 2023 19:51:49 +0000 (22:51 +0300)
bin/recode_filenames.py

index ae2b50b48efae91f6493f717c6cc8a7f27ba8fe2..b8d3fa04daca8794a10479951126cb9e3a7932ac 100755 (executable)
@@ -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)