Skip to content

Commit

Permalink
Use webDavPath transform for alias-link-resources only
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed Aug 24, 2022
1 parent ad964ee commit fd0d121
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/web-app-files/src/helpers/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit fd0d121

Please sign in to comment.