Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Issue 118376: Fix bug in PathDifference that truncated paths. (epot_tools) (Closed)

Created:
11 years, 6 months ago by SkyLined
Modified:
9 years, 5 months ago
Reviewers:
M-A Ruel
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

PathDifference cuts a supplied "root path" from a second path and returns what remains. It is assumed that this can be used as a relative path from the "root path" to the second path. If the root path ends with a path separator (\ or /), the function used to cut an additional character from the path and the returned value would be incorrect. This fix makes sure the behavior is consistent and correct no matter if the root path ends with a separator or not. (This fixes the "epot_tools" tools bug.) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=17855

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M trychange.py View 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
SkyLined
I would use "os.path.relpath()" but I didn't want to modify the code too much and ...
11 years, 6 months ago (2009-06-08 09:42:33 UTC) #1
M-A Ruel
11 years, 6 months ago (2009-06-08 13:54:40 UTC) #2
lgtm, thanks.

os.path.relpath() is new in version 2.6 and we still support 2.4.

Powered by Google App Engine
This is Rietveld 408576698