We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 50870a3 commit 23fd583Copy full SHA for 23fd583
1 file changed
src/vaults/modvault/utils.py
@@ -123,8 +123,8 @@ def iconPathToFull(moddir: str, iconpath: str) -> str:
123
124
125
def fullPathToIcon(moddir: str, path: str) -> str:
126
- p = os.path.normpath(os.path.abspath(path))
127
- return os.path.join("/mods", p.removeprefix(os.path.normpath(moddir)).lstrip(os.sep))
+ rel = os.path.relpath(os.path.abspath(path), start=os.path.abspath(moddir))
+ return f"/mods/{rel.replace(os.sep, '/')}"
128
129
130
def getIcon(name):
0 commit comments