Skip to content

Commit 6000f33

Browse files
committed
Return an error when aborting due to existing .orig file (fixes techtonik#60)
1 parent c9402be commit 6000f33

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)