Skip to content

Commit

Permalink
Merge pull request #39656 from nextcloud/fix/filename-files/master
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Aug 3, 2023
2 parents 90bb0a2 + 7744632 commit c7c94a3
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 11 deletions.
12 changes: 10 additions & 2 deletions apps/files/src/components/FileEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<span class="files-list__row-name-text">
<!-- Keep the displayName stuck to the extension to avoid whitespace rendering issues-->
<span class="files-list__row-name-" v-text="displayName" />
<span class="files-list__row-name-ext" v-text="source.extension" />
<span class="files-list__row-name-ext" v-text="extension" />
</span>
</a>
</td>
Expand Down Expand Up @@ -157,6 +157,7 @@ import { debounce } from 'debounce'
import { emit } from '@nextcloud/event-bus'
import { formatFileSize, Permission } from '@nextcloud/files'
import { Fragment } from 'vue-frag'
import { extname } from 'path'
import { showError, showSuccess } from '@nextcloud/dialogs'
import { translate } from '@nextcloud/l10n'
import { generateUrl } from '@nextcloud/router'
Expand Down Expand Up @@ -290,8 +291,15 @@ export default Vue.extend({
fileid() {
return this.source?.fileid?.toString?.()
},
extension() {
if (this.source.attributes?.displayName) {
return extname(this.source.attributes.displayName)
}
return this.source.extension || ''
},
displayName() {
const ext = (this.source.extension || '')
const ext = this.extension
const name = (this.source.attributes.displayName
|| this.source.basename)
Expand Down
4 changes: 2 additions & 2 deletions dist/1929-1929.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/1929-1929.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files_sharing-files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_sharing-files_sharing_tab.js.map

Large diffs are not rendered by default.

0 comments on commit c7c94a3

Please sign in to comment.