Skip to content

Commit

Permalink
Folder merge fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Krummers committed Dec 16, 2023
1 parent ee71ff8 commit 6143b78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Patcher/Modules/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ class Folder(File):
def merge(self, other):
if not isinstance(other, Folder):
raise TypeError("'other' must be a folder")
if self.path == other.path:
return
for file in os.listdir(other.path):
if os.path.isfile(os.path.join(other.path, file)):
old = File(os.path.join(self.path, file))
Expand Down

0 comments on commit 6143b78

Please sign in to comment.