Merge pull request #210 from mentalfl0w/dev

Fix the FolderDialog and macOS download bug.
This commit is contained in:
zhuzichu 2023-07-23 15:42:59 +08:00 committed by GitHub
commit 10da873701
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
import QtQuick import QtQuick
import QtCore import Qt.labs.platform
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
@ -117,7 +117,7 @@ FluScrollablePage{
id: file_dialog id: file_dialog
currentFolder: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0] currentFolder: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]
onAccepted: { onAccepted: {
var path = selectedFolder.toString().replace("file:///","") + "/big_buck_bunny.mp4" var path = currentFolder.toString().replace(FluTools.isMacos() ? "file://" : "file:///","") + "/big_buck_bunny.mp4"
http_download.download(path) http_download.download(path)
} }
} }