| 212 | bool exists = false; |
| 213 | |
| 214 | struct stat sb; |
| 215 | if (stat(file_path.c_str(), &sb) == 0 && S_ISREG(sb.st_mode)) { |
| 216 | // Use the directory and name of the existing file. |
| 217 | gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), file_path.data()); |