Skip to content

Commit

Permalink
Address PR issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lookacat committed Oct 4, 2022
1 parent 45beec3 commit d3f4448
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ module.exports = {
'no-new': 'off',
'jest/no-standalone-expect': 'off',
'node/no-callback-literal': 'off',
'unused-imports/no-unused-imports': 'error',
'no-useless-constructor': 0
'unused-imports/no-unused-imports': 'error'
},
globals: {
require: false,
Expand Down
14 changes: 9 additions & 5 deletions packages/web-app-files/src/helpers/resource/actions/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,17 @@ export class ResourcesUpload extends ConflictDialog {
for (const file of filesInFolder) {
const newFolderName = resolveFileNameDuplicate(folder, '', this.currentFiles)
file.meta.relativeFolder = file.meta.relativeFolder.replace(
`/${folder}`,
new RegExp(`/${folder}` + '$'),
`/${newFolderName}`
)
file.meta.relativePath = file.meta.relativePath.replace(
new RegExp(`/${folder}/` + '$'),
`/${newFolderName}/`
)
file.meta.tusEndpoint = file.meta.tusEndpoint.replace(
new RegExp(`/${folder}` + '$'),
`/${newFolderName}`
)
file.meta.relativePath = file.meta.relativePath.replace(`/${folder}/`, `/${newFolderName}/`)
file.meta.tusEndpoint = file.meta.tusEndpoint.replace(`/${folder}`, `/${newFolderName}`)
const data = file.data as any
data.relativePath = data.relativePath.replace(`/${folder}/`, `/${newFolderName}/`)
}
}
if (files.length === 0) return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ interface FileConflict {
}

export class ConflictDialog {
/* eslint-disable */
constructor(
protected createModal: (modal: object) => void,
protected hideModal: () => void,
Expand Down

0 comments on commit d3f4448

Please sign in to comment.