Skip to content

Commit

Permalink
Fix file picker not respecting hidden files settings
Browse files Browse the repository at this point in the history
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 <carl@carlschwan.eu>
  • Loading branch information
CarlSchwan committed Jan 13, 2022
1 parent 89d109a commit 1fa58be
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
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.

0 comments on commit 1fa58be

Please sign in to comment.