Skip to content

Commit d888011

Browse files
authored
Merge pull request #1 from fmarier/issue60
Return an error when aborting due to existing .orig file
2 parents 2942355 + 6000f33 commit d888011

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,7 @@ def apply(self, strip=0, root=None):
940940
backupname = filename+b".orig"
941941
if exists(backupname):
942942
warning("can't backup original file to %s - aborting" % backupname)
943+
errors += 1
943944
else:
944945
import shutil
945946
shutil.move(filename, backupname)

0 commit comments

Comments
 (0)