Skip to content
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
Fix file picker not respecting hidden files settings
This will only respect the setting inside the file app. For other apps
we will either need to do an API call or add an input field with the
same idea to spare a blocking api call.

Signed-off-by: Carl Schwan <[email protected]>
  • Loading branch information
CarlSchwan committed Jan 13, 2022
commit 1fa58be1aa78ff6216b7a129925a7bb270ac9fe1
10 changes: 10 additions & 0 deletions core/src/OC/dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,16 @@ const Dialogs = {
})
}

// Check if the showHidden input field exist and if it exist follow it
// Otherwise just show the hidden files
const showHiddenInput = document.getElementById('showHiddenFiles')
const showHidden = showHiddenInput === null || showHiddenInput.value === "1"
if (!showHidden) {
files = files.filter(function(file) {
return !file.name.startsWith('.')
})
}

var Comparators = {
name: function(fileInfo1, fileInfo2) {
if (fileInfo1.type === 'dir' && fileInfo2.type !== 'dir') {
Expand Down
4 changes: 2 additions & 2 deletions dist/core-login.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.