From 705722d6122dc78639a7081eb9f8a695c31acbe1 Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Sun, 27 Mar 2011 15:24:14 -0400 Subject: [PATCH] state.relpath: correct broken paths ending with /, etc. Bug reported by Elliott Hird. Based on a patch by Tim Allen, but I didn't do it the same way. --- state.py | 1 + 1 file changed, 1 insertion(+) diff --git a/state.py b/state.py index 84eecf7..5310ef9 100644 --- a/state.py +++ b/state.py @@ -120,6 +120,7 @@ def relpath(t, base): if not _cwd: _cwd = os.getcwd() t = os.path.normpath(os.path.join(_cwd, t)) + base = os.path.normpath(base) tparts = t.split('/') bparts = base.split('/') for tp,bp in zip(tparts,bparts):