summaryrefslogtreecommitdiffstats
path: root/core/src/OC
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-01-11 15:06:54 +0100
committerCarl Schwan <carl@carlschwan.eu>2022-01-13 12:36:42 +0100
commit1fa58be1aa78ff6216b7a129925a7bb270ac9fe1 (patch)
tree2d3c06bc78c576e1f305aa5155f171cd524fbc86 /core/src/OC
parent89d109a4d9a9c471f9dde7d5bd12a60ca91fe1f9 (diff)
downloadnextcloud-server-1fa58be1aa78ff6216b7a129925a7bb270ac9fe1.tar.gz
nextcloud-server-1fa58be1aa78ff6216b7a129925a7bb270ac9fe1.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>
Diffstat (limited to 'core/src/OC')
-rw-r--r--core/src/OC/dialogs.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/src/OC/dialogs.js b/core/src/OC/dialogs.js
index b1d0e24c076..8efcd4078dd 100644
--- a/core/src/OC/dialogs.js
+++ b/core/src/OC/dialogs.js
@@ -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') {