File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed
Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export const action = new FileAction({
4444
4545 async exec ( node : Node ) {
4646 try {
47- await axios . delete ( node . source )
47+ await axios . delete ( node . encodedSource )
4848
4949 // Let's delete even if it's moved to the trashbin
5050 // since it has been removed from the current view
Original file line number Diff line number Diff line change @@ -845,7 +845,7 @@ export default Vue.extend({
845845 // Rename and move the file
846846 async onRename() {
847847 const oldName = this .source .basename
848- const oldSource = this .source .source
848+ const oldEncodedSource = this .source .encodedSource
849849 const newName = this .newName .trim ?.() || ' '
850850 if (newName === ' ' ) {
851851 showError (this .t (' files' , ' Name cannot be empty' ))
@@ -870,12 +870,13 @@ export default Vue.extend({
870870 // Update node
871871 this .source .rename (newName )
872872
873+ logger .debug (' Moving file to' , { destination: this .source .encodedSource , oldEncodedSource })
873874 try {
874875 await axios ({
875876 method: ' MOVE' ,
876- url: oldSource ,
877+ url: oldEncodedSource ,
877878 headers: {
878- Destination: encodeURI ( this .source .source ) ,
879+ Destination: this .source .encodedSource ,
879880 },
880881 })
881882
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ import { getCurrentUser } from '@nextcloud/auth'
3030import { getClient , rootPath } from './WebdavClient'
3131import { hashCode } from '../utils/hashUtils'
3232import logger from '../logger'
33- import { encodePath } from '@nextcloud/paths'
3433
3534const client = getClient ( )
3635
@@ -45,7 +44,7 @@ export const resultToNode = function(node: FileStat): File | Folder {
4544 const permissions = davParsePermissions ( props ?. permissions )
4645 const owner = getCurrentUser ( ) ?. uid as string
4746
48- const source = generateRemoteUrl ( encodePath ( 'dav' + rootPath + node . filename ) )
47+ const source = generateRemoteUrl ( 'dav' + rootPath + node . filename )
4948 const id = props ?. fileid < 0
5049 ? hashCode ( source )
5150 : props ?. fileid as number || 0
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ registerFileAction(new FileAction({
5454 const destination = generateRemoteUrl ( encodePath ( `dav/trashbin/${ getCurrentUser ( ) ?. uid } /restore/${ node . basename } ` ) )
5555 await axios ( {
5656 method : 'MOVE' ,
57- url : node . source ,
57+ url : node . encodedSource ,
5858 headers : {
5959 destination,
6060 } ,
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ const resultToNode = function(node: FileStat): File | Folder {
4646
4747 const nodeData = {
4848 id : node . props ?. fileid as number || 0 ,
49- source : generateRemoteUrl ( encodePath ( 'dav' + rootPath + node . filename ) ) ,
49+ source : generateRemoteUrl ( 'dav' + rootPath + node . filename ) ,
5050 // do not show the mtime column
5151 // mtime: new Date(node.lastmod),
5252 mime : node . mime as string ,
You can’t perform that action at this time.
0 commit comments