Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug file extension was missing while crating file #10169

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Bugfix: Created file missing extension when file extensions not shown is active

We've fixed a bug where the file extension was missing,
when the user set the file extensions not shown configuration option.
This affected files that are handled via external applications, for example Microsoft Excel.

https://github.com/owncloud/web/issues/10170
https://github.com/owncloud/web/pull/10169
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,17 @@ export const useFileActionsCreateNewFile = ({
),
inputSelectionRange,
onCancel: () => store.dispatch('hideModal'),
onConfirm: !openAction
? addAppProviderFileFunc
: (fileName) => {
if (!areFileExtensionsShown.value) {
fileName = `${fileName}.${extension}`
}
addNewFile(fileName, openAction)
},
onConfirm: (fileName: string) => {
if (!areFileExtensionsShown.value) {
fileName = `${fileName}.${extension}`
}

if (!openAction) {
return addAppProviderFileFunc(fileName)
}

return addNewFile(fileName, openAction)
},
onInput: checkInputValue
}

Expand Down