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

[stable28] fix: Properly take show_hidden user setting into account for file listing #42023

Merged
merged 3 commits into from
Dec 5, 2023
Merged
Changes from 2 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
10 changes: 8 additions & 2 deletions apps/files/src/views/FilesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,16 @@ export default defineComponent({
},

dirContents(): Node[] {
const showHidden = this.userConfigStore?.userConfig.show_hidden
return (this.currentFolder?._children || [])
.map(this.getNode)
.filter(file => file)
.filter(file => file?.attributes?.hidden !== true)
.filter(file => {
if (!showHidden) {
return file && file?.attributes?.hidden !== true && !file?.basename.startsWith('.')
}

return !!file
})
},

/**
Expand Down
Loading