Skip to content

Commit

Permalink
Keep both conflict (#9915)
Browse files Browse the repository at this point in the history
* keep both conflict fix

* keep both conflict cleanup

* added changelog, keep both conflict

* fixed changelog, keep both conflict
  • Loading branch information
jacob-nv authored and AlexAndBear committed Dec 13, 2023
1 parent d375122 commit 64460ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-keep-both-conflict
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Keep both folders conflict in same-named folders

Parsing has been adjusted to account for edge case of multiple folders and sub-folders with the same name

https://github.com/owncloud/web/pull/9915
https://github.com/owncloud/web/issues/9158
6 changes: 3 additions & 3 deletions packages/web-app-files/src/helpers/resource/actions/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,18 @@ export class ResourceConflict extends ConflictDialog {
`/${newFolderName}/`
)
file.meta.tusEndpoint = file.meta.tusEndpoint.replace(
new RegExp(`/${encodeURIComponent(folder)}`),
new RegExp(`/${encodeURIComponent(folder)}$`),
`/${encodeURIComponent(newFolderName)}`
)
if (file.xhrUpload?.endpoint) {
file.xhrUpload.endpoint = file.xhrUpload.endpoint.replace(
new RegExp(`/${encodeURIComponent(folder)}`),
new RegExp(`/${encodeURIComponent(folder)}$`),
`/${encodeURIComponent(newFolderName)}`
)
}
if (file.tus?.endpoint) {
file.tus.endpoint = file.tus.endpoint.replace(
new RegExp(`/${encodeURIComponent(folder)}`),
new RegExp(`/${encodeURIComponent(folder)}$`),
`/${encodeURIComponent(newFolderName)}`
)
}
Expand Down

0 comments on commit 64460ba

Please sign in to comment.