mirror of
https://github.com/open-mmlab/mmengine.git
synced 2025-06-03 21:54:44 +08:00
[Fix] Path mapping only once in storage backends (#490)
This commit is contained in:
parent
15905bdcc0
commit
eddc92fbeb
@ -87,7 +87,7 @@ class PetrelBackend(BaseStorageBackend):
|
|||||||
filepath = str(filepath)
|
filepath = str(filepath)
|
||||||
if self.path_mapping is not None:
|
if self.path_mapping is not None:
|
||||||
for k, v in self.path_mapping.items():
|
for k, v in self.path_mapping.items():
|
||||||
filepath = filepath.replace(k, v)
|
filepath = filepath.replace(k, v, 1)
|
||||||
return filepath
|
return filepath
|
||||||
|
|
||||||
def _format_path(self, filepath: str) -> str:
|
def _format_path(self, filepath: str) -> str:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user