fix: dialog DCHECK on Linux (#28534)

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot]
2021-04-07 09:49:17 +09:00
committed by GitHub
parent 6e66699822
commit 6f44fa6dbd

View File

@@ -82,6 +82,7 @@ class FileChooserDialog {
gtk_file_chooser_set_create_folders(GTK_FILE_CHOOSER(dialog_), TRUE);
if (!settings.default_path.empty()) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
if (base::DirectoryExists(settings.default_path)) {
gtk_file_chooser_set_current_folder(
GTK_FILE_CHOOSER(dialog_), settings.default_path.value().c_str());