Skip to content

Commit

Permalink
Merge pull request #1 from fmarier/issue60
Browse files Browse the repository at this point in the history
Return an error when aborting due to existing .orig file
  • Loading branch information
fmarier authored Jul 3, 2019
2 parents 2942355 + 6000f33 commit d888011
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,7 @@ def apply(self, strip=0, root=None):
backupname = filename+b".orig"
if exists(backupname):
warning("can't backup original file to %s - aborting" % backupname)
errors += 1
else:
import shutil
shutil.move(filename, backupname)
Expand Down

0 comments on commit d888011

Please sign in to comment.