diff --git a/commands/duplicate.py b/commands/duplicate.py index 3c39ee5..f450ede 100644 --- a/commands/duplicate.py +++ b/commands/duplicate.py @@ -53,9 +53,7 @@ def duplicate(self, dst, input_path): ) else: if not os.path.exists(dst): - with open(dst, "w") as fp: - with open(self.origin, "r") as fpread: - fp.write(fpread.read()) + shutil.copy2(self.origin, dst) self.window.open_file(dst) else: