@@ -13,7 +13,8 @@ import CopyIconSvg from '@mdi/svg/svg/folder-multiple-outline.svg?raw'
1313import { isAxiosError } from '@nextcloud/axios'
1414import { FilePickerClosed , getFilePickerBuilder , showError , showInfo , TOAST_PERMANENT_TIMEOUT } from '@nextcloud/dialogs'
1515import { emit } from '@nextcloud/event-bus'
16- import { davGetClient , davGetDefaultPropfind , davResultToNode , davRootPath , FileAction , FileType , getUniqueName , NodeStatus , Permission } from '@nextcloud/files'
16+ import { FileAction , FileType , getUniqueName , NodeStatus , Permission } from '@nextcloud/files'
17+ import { defaultRootPath , getClient , getDefaultPropfind , resultToNode } from '@nextcloud/files/dav'
1718import { translate as t } from '@nextcloud/l10n'
1819import { hasConflict , openConflictPicker } from '@nextcloud/upload'
1920import { basename , join } from 'path'
@@ -119,9 +120,9 @@ export async function handleCopyMoveNodeTo(node: Node, destination: Folder, meth
119120 }
120121
121122 try {
122- const client = davGetClient ( )
123- const currentPath = join ( davRootPath , node . path )
124- const destinationPath = join ( davRootPath , destination . path )
123+ const client = getClient ( )
124+ const currentPath = join ( defaultRootPath , node . path )
125+ const destinationPath = join ( defaultRootPath , destination . path )
125126
126127 if ( method === MoveCopyAction . COPY ) {
127128 let target = node . basename
@@ -144,10 +145,10 @@ export async function handleCopyMoveNodeTo(node: Node, destination: Folder, meth
144145 join ( destinationPath , target ) ,
145146 {
146147 details : true ,
147- data : davGetDefaultPropfind ( ) ,
148+ data : getDefaultPropfind ( ) ,
148149 } ,
149150 ) as ResponseDataDetailed < FileStat >
150- emit ( 'files:node:created' , davResultToNode ( data ) )
151+ emit ( 'files:node:created' , resultToNode ( data ) )
151152 }
152153 } else {
153154 // show conflict file popup if we do not allow overwriting
0 commit comments