File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1157,14 +1157,18 @@ export default defineComponent({
11571157 try {
11581158 const fileid = this.currentFile.fileid
11591159 const url = this.currentFile.source ?? this.currentFile.davPath
1160+ const isDavResource = url.includes('remote.php/dav')
11601161
11611162 // Fake node to emit the event until Viewer is migrated to the new Node API.
1163+ // The node source must stay un-encoded (like the nodes built elsewhere in
1164+ // this file) as consumers of the event compare it against the store, which
1165+ // keeps sources decoded. The request below still uses the encoded ` url` .
11621166 const node = new NcFile({
1163- source: url,
1167+ source: isDavResource ? (defaultRemoteURL + getRootPath() + this.currentFile.filename) : url,
11641168 id: fileid,
11651169 mime: this.currentFile.mime,
11661170 owner: this.currentFile.ownerId,
1167- root: url.includes('remote.php/dav') ? davGetRootPath() : undefined,
1171+ root: isDavResource ? davGetRootPath() : undefined,
11681172 })
11691173
11701174 await axios.delete(url)
You can’t perform that action at this time.
0 commit comments