Fix the strings/bytes mess with shutil

This commit is contained in:
2023-10-20 18:36:47 +02:00
parent 733b8c6d12
commit 103714e9c6

4
ulzx
View File

@@ -121,7 +121,9 @@ class ULzx(Archive):
os.path.join(current_dir, self._arch)],
stdout=fnull, stderr=fnull)
if result == 0:
shutil.copy2(src, dst)
# use subprocess, as shutil.copy2 will complain about mixing
# strings with bytes
subprocess.run(['cp', src, dst])
except CalledProcessError:
return 1
finally: