diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-01-11 15:06:54 +0100 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-01-14 11:46:43 +0100 |
commit | 1904793d4bb99710fefbd5b1e0b23d44694ded4f (patch) | |
tree | c3c557c4bdf3df6e8fba247a3adf1af233885249 /core/src | |
parent | 1938c41ace9a1038e3e93f40db86328262d5c6b2 (diff) | |
download | nextcloud-server-1904793d4bb99710fefbd5b1e0b23d44694ded4f.tar.gz nextcloud-server-1904793d4bb99710fefbd5b1e0b23d44694ded4f.zip |
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 <carl@carlschwan.eu>
(cherry picked from commit 1fa58be1aa78ff6216b7a129925a7bb270ac9fe1)
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/OC/dialogs.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/src/OC/dialogs.js b/core/src/OC/dialogs.js index 7a2ca0405d5..43f96eba41c 100644 --- a/core/src/OC/dialogs.js +++ b/core/src/OC/dialogs.js @@ -1148,6 +1148,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') { |