mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 18:21:40 -04:00
fix(files): recursive drop path join
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
This commit is contained in:
parent
66b2fd95d1
commit
820b67a5e2
1 changed files with 5 additions and 2 deletions
|
|
@ -29,6 +29,7 @@ import { davGetClient, davGetDefaultPropfind, davResultToNode, davRootPath } fro
|
|||
import { translate as t } from '@nextcloud/l10n'
|
||||
import { getUploader } from '@nextcloud/upload'
|
||||
import logger from '../logger.js'
|
||||
import { joinPaths } from '@nextcloud/paths'
|
||||
|
||||
export const handleDrop = async (data: DataTransfer) => {
|
||||
// TODO: Maybe handle `getAsFileSystemHandle()` in the future
|
||||
|
|
@ -85,10 +86,12 @@ const handleRecursiveUpload = async (entry: FileSystemEntry, path: string = ''):
|
|||
]
|
||||
} else {
|
||||
const directory = entry as FileSystemDirectoryEntry
|
||||
logger.debug('Handle directory recursivly', { name: directory.name })
|
||||
|
||||
// TODO: Implement this on `@nextcloud/upload`
|
||||
const absolutPath = `${davRootPath}${getUploader().destination.path}${path}${directory.name}`
|
||||
const absolutPath = joinPaths(davRootPath, getUploader().destination.path, path, directory.name)
|
||||
|
||||
logger.debug('Handle directory recursively', { name: directory.name, absolutPath })
|
||||
|
||||
const davClient = davGetClient()
|
||||
const dirExists = await davClient.exists(absolutPath)
|
||||
if (!dirExists) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue