From 3aaee9a7c7ada5d332193213eb88d7b010b76ebd Mon Sep 17 00:00:00 2001 From: Alec Warner Date: Thu, 18 Jan 2007 06:23:12 +0000 Subject: dump emerge's normpath in favor of portage_util's normalize_path svn path=/main/trunk/; revision=5698 --- pym/portage_util.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pym') diff --git a/pym/portage_util.py b/pym/portage_util.py index 40bdcb9cf..cc5a566b8 100644 --- a/pym/portage_util.py +++ b/pym/portage_util.py @@ -32,6 +32,11 @@ def writemsg_stdout(mystr,noiselevel=0): writemsg(mystr, noiselevel=noiselevel, fd=sys.stdout) def normalize_path(mypath): + """ + os.path.normpath("//foo") returns "//foo" instead of "/foo" + We dislike this behavior so we create our own normpath func + to fix it. + """ if mypath.startswith(os.path.sep): # posixpath.normpath collapses 3 or more leading slashes to just 1. return os.path.normpath(2*os.path.sep + mypath) -- cgit v1.2.3-1-g7c22