Skip to content

Commit dd34c68

Browse files
committed
Update file_url() handling of Thunderbird comm paths
In commit df291c6, root_dir was changed from a relative path to an absolute path, resulting in file_url() no longer detecting the path correctly as it didn't start with "comm/". This change allows file_url() to correctly detect and handle an absolute path that includes "comm/".
1 parent 368f45d commit dd34c68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/taskgraph/parameters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ def file_url(self, path, pretty=False):
253253
:return str: The URL displaying the given path.
254254
"""
255255
if self["repository_type"] == "hg":
256-
if path.startswith("comm/"):
257-
path = path[len("comm/") :]
256+
if "comm/" in path:
257+
path = path.split("comm/")[1]
258258
repo = self["comm_head_repository"]
259259
rev = self["comm_head_rev"]
260260
else:

0 commit comments

Comments
 (0)