From 324dddee5d6ff960619ab7a45f1d15d2c6b467e5 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 3 Nov 2018 06:23:11 +0000 Subject: [PATCH] Updated the patch for patch.py - Legacy-Id: 15691 --- patch/fix-patch-no-chdir.patch | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/patch/fix-patch-no-chdir.patch b/patch/fix-patch-no-chdir.patch index 178aef950..5864bded8 100644 --- a/patch/fix-patch-no-chdir.patch +++ b/patch/fix-patch-no-chdir.patch @@ -1,6 +1,6 @@ ---- patch.py.old 2018-03-09 07:53:37.586201595 -0800 -+++ patch.py 2018-03-09 09:17:25.017418754 -0800 -@@ -804,10 +804,10 @@ +--- patch.py.original 2018-11-02 23:17:51.816936730 -0700 ++++ patch.py 2018-11-02 23:20:28.800705155 -0700 +@@ -803,10 +803,10 @@ def findfile(self, old, new): """ return name of file to be patched or None """ @@ -14,19 +14,18 @@ else: # [w] Google Code generates broken patches with its online editor debug("broken patch from Google Code, stripping prefixes..") - -@@ -827,9 +827,6 @@ +@@ -826,10 +826,6 @@ from file paths. `root` parameter specifies working dir. return True on success """ - if root: - prevdir = os.getcwd() - os.chdir(root) - +- total = len(self.items) errors = 0 - -@@ -854,6 +851,8 @@ + if strip: +@@ -853,6 +849,8 @@ new = pathstrip(p.target, strip) else: old, new = p.source, p.target @@ -35,8 +34,7 @@ filename = self.findfile(old, new) - -@@ -956,9 +955,6 @@ +@@ -954,9 +952,6 @@ # todo: proper rejects shutil.move(backupname, filename)