From fd0d121a33e538bbf90cdc110cd2923491d1e1a2 Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Tue, 23 Aug 2022 14:21:09 +0200 Subject: [PATCH] Use webDavPath transform for alias-link-resources only --- packages/web-app-files/src/helpers/resources.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web-app-files/src/helpers/resources.ts b/packages/web-app-files/src/helpers/resources.ts index 43658480978..b77ccd68a3f 100644 --- a/packages/web-app-files/src/helpers/resources.ts +++ b/packages/web-app-files/src/helpers/resources.ts @@ -50,9 +50,9 @@ export function buildResource(resource): Resource { } const id = resource.fileInfo[DavProperty.FileId] - const idComponent = resource.name.split('/')[2] + const pathParts = resource.name.split('/') let webDavPath - if (idComponent?.includes('!')) { + if (pathParts.length === 3 && !isFolder && pathParts[2].includes('!')) { // idComponent includes the opaqueID which represents the resource name. // For the webdav path, we need to replace the opaqueID with the actual resource name. const withoutOpaqueId = resource.name.split('!')[0]