Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.15.4
-
None
Description
FolderListModel cannot browse content of a folder with the % symbol in the folder name. Even standard FileDialog cannot show the folder content.
For example both of these classes do no show content of the /run/user/1302/media/ext3-4GB/STORE%5Cx20N%5Cx20GO/ folder in following example:
root@amneo:~# ls -Alh /run/user/1302/media/ext3-4GB/ total 36K drwxr-xr-x 2 root root 4.0K 2021-08-25 13:52 %5Cx20N%5Cx20GO drwx------ 2 root root 16K 2021-03-25 13:08 lost+found drwxr-xr-x 2 root root 4.0K 2021-08-25 16:04 öäüÖäüÄÜWß drwxr-xr-x 5 root root 4.0K 2021-08-25 12:37 STORE%5Cx20N%5Cx20GO -rw-r--r-- 1 root root 0 2021-04-08 11:32 以表示所有万国码 drwxr-xr-x 2 root root 4.0K 2021-08-25 16:05 以表示所有万国码码 drwxr-xr-x 3 root root 4.0K 2021-08-25 16:54 有万国äüÄÜßaàáãạДяприь -rw-r--r-- 1 root root 0 2021-08-25 16:53 有万国äüÄÜßaàáãạДяприь.txt root@amneo:~# ls -Alh /run/user/1302/media/ext3-4GB/%5Cx20N\%5Cx20GO/ total 0 root@amneo:~# ls -Alh /run/user/1302/media/ext3-4GB/STORE\%5Cx20N\%5Cx20GO/ total 12K drwxr-xr-x 2 root root 4.0K 2021-08-25 13:52 %5Cx20N%5Cx20GO drwxr-xr-x 2 root root 4.0K 2021-08-25 16:04 öäüÖäüÄÜWß -rw-r--r-- 1 root root 0 2021-04-08 11:32 以表示所有万国码 - Copy drwxr-xr-x 2 root root 4.0K 2021-08-25 16:05 以表示所有万国码码 root@amneo:~#
So, the following Qt example does not show the folder content:
import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Layouts 1.12 import QtQuick.Dialogs 1.2 Rectangle { id: root anchors.fill: parent FileDialog { id: fileDialog title: "Please choose a file" folder: "file:///run/user/1302/media/ext3-4GB" onAccepted: { console.log("You chose: " + fileDialog.fileUrls) } onRejected: { console.log("Canceled") } Component.onCompleted: visible = true } }
Neither does FolderListModel.
Attachments
Issue Links
- relates to
-
QTBUG-45347 FolderListModel: fileSuffix wrong when the file name contains dots
- Reported
-
QTBUG-58335 FolderListModel several bugs
- Reported
-
QTBUG-38682 QML FileDialog can't select files inside a folder with an ampersand in its name
- Reported