Skip to content

Commit f80f6b2

Browse files
committed
fix: RedirectPathHandler redirect to incorrect path
1 parent 225f19e commit f80f6b2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

easycore/common/path/redirect_path_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def redirect(self, path: str) -> str:
3737
Returns:
3838
str: path of old_prefix.
3939
"""
40-
return self.old_prefix + path.lstrip(self.new_prefix)
40+
return path.replace(self.new_prefix, self.old_prefix, 1)
4141

4242
def get_local_path(self, path: str) -> str:
4343
"""

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name = 'easycore',
5-
version = '0.4.0',
5+
version = '0.4.1',
66
author = 'Yuxin Zhao',
77
url = 'https://github.com/YuxinZhaozyx/easycore',
88
packages = find_packages(),

0 commit comments

Comments
 (0)