Skip to content

Commit

Permalink
[Fix] Path mapping only once in storage backends (#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouzaida authored Aug 30, 2022
1 parent 15905bd commit eddc92f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmengine/fileio/file_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def _map_path(self, filepath: Union[str, Path]) -> str:
filepath = str(filepath)
if self.path_mapping is not None:
for k, v in self.path_mapping.items():
filepath = filepath.replace(k, v)
filepath = filepath.replace(k, v, 1)
return filepath

def _format_path(self, filepath: str) -> str:
Expand Down

0 comments on commit eddc92f

Please sign in to comment.