#536 - Update relative path

This commit is contained in:
Elio Struyf
2023-03-15 09:02:14 +01:00
parent 623c340f49
commit 92d507364e
2 changed files with 9 additions and 3 deletions
@@ -109,7 +109,10 @@ export const Item: React.FunctionComponent<IItemProps> = ({
relPath = mediaParsed.split(wsFolderParsed).pop();
if (settings.staticFolder && relPath) {
// If the static folder is the root, we can just return the relative path
if (settings.staticFolder === "/") {
return relPath;
} else if (settings.staticFolder && relPath) {
const staticFolderParsed = parseWinPath(settings.staticFolder);
relPath = relPath.split(staticFolderParsed).pop();
}