fix: dialog DCHECK on Linux (#28478)

This commit is contained in:
Shelley Vohr 2021-04-06 06:54:58 +00:00 committed by GitHub
parent e2f49edf83
commit 3ed8da0931
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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