aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/assistant/Picker.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/assistant/Picker.qml')
-rw-r--r--desktop/assistant/Picker.qml9
1 files changed, 7 insertions, 2 deletions
diff --git a/desktop/assistant/Picker.qml b/desktop/assistant/Picker.qml
index 1465d1b..6d7b8ad 100644
--- a/desktop/assistant/Picker.qml
+++ b/desktop/assistant/Picker.qml
@@ -49,13 +49,18 @@ Rectangle {
FolderListModel {
id: files
- folder: "file://" + picker.dir
+ // Encoded: a raw "#" or "?" in a folder name would end the path.
+ folder: "file://" + picker.dir.split("/").map(encodeURIComponent).join("/")
showDirsFirst: true
+ // Name filters never apply to folders, so while filtering they would
+ // sit first and catch Enter. ponytail: no filtering to a folder.
+ showDirs: field.text === ""
showDotAndDotDot: false
// Hidden entries only on asking for them.
showHidden: field.text.startsWith(".")
caseSensitive: false
- nameFilters: field.text ? ["*" + field.text + "*"] : ["*"]
+ // Glob characters are taken out: typed, they are meant literally.
+ nameFilters: field.text ? ["*" + field.text.replace(/[*?\[\]]/g, "") + "*"] : ["*"]
sortCaseSensitive: false
}