aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/src
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-07-25 01:23:59 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-07-25 01:24:26 +0200
commit80d797edf3538fb26f139b4f50fd1eec939a0a3b (patch)
treeda14624e34abc045d495d0b48ba88c02176a2dc2 /apps/files/src
parent5dc8e06014f1f8b7197ec6bf8c030b4978f23da2 (diff)
downloadnextcloud-server-80d797edf3538fb26f139b4f50fd1eec939a0a3b.tar.gz
nextcloud-server-80d797edf3538fb26f139b4f50fd1eec939a0a3b.zip
fix: Ensure displayname is a string
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files/src')
-rw-r--r--apps/files/src/services/Files.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files/src/services/Files.ts b/apps/files/src/services/Files.ts
index dc83f16187b..10e553592fe 100644
--- a/apps/files/src/services/Files.ts
+++ b/apps/files/src/services/Files.ts
@@ -14,7 +14,14 @@ import logger from '../logger.js'
* Slim wrapper over `@nextcloud/files` `davResultToNode` to allow using the function with `Array.map`
* @param node The node returned by the webdav library
*/
-export const resultToNode = (node: FileStat): File | Folder => davResultToNode(node)
+export const resultToNode = (node: FileStat): File | Folder => {
+ // TODO remove this hack with nextcloud-files v3.7
+ // just needed because of a bug in the webdav client
+ if (node.props?.displayname !== undefined) {
+ node.props.displayname = String(node.props.displayname)
+ }
+ return davResultToNode(node)
+}
export const getContents = (path = '/'): CancelablePromise<ContentsWithRoot> => {
const controller = new AbortController()