Skip to content

Commit

Permalink
fix(files): Correctly create Nodes from WebDAV result in "recent"-view
Browse files Browse the repository at this point in the history
The recent search works on a different remote URL so the source of the files were wrong,
because the remote url was included twice in the source.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux authored and backportbot[bot] committed Aug 1, 2024
1 parent c5f876b commit 3c3c7ed
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/files/src/services/Recent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ const client = davGetClient()

const lastTwoWeeksTimestamp = Math.round((Date.now() / 1000) - (60 * 60 * 24 * 14))

/**
* Helper to map a WebDAV result to a Nextcloud node
* The search endpoint already includes the dav remote URL so we must not include it in the source
*
* @param stat the WebDAV result
*/
const resultToNode = (stat: FileStat) => davResultToNode(stat, davRootPath, getBaseUrl())

/**
* Get recently changed nodes
*
Expand Down

0 comments on commit 3c3c7ed

Please sign in to comment.