@eht16 commented on this pull request.
if (ft == NULL || ft->id == GEANY_FILETYPES_NONE)
/* ft is NULL when a new file without template was opened, so use the * configured default file type */ ft = filetypes_lookup_by_name(instantsave_default_ft);
- if (ft != NULL) - /* add the filetype's default extension to the new filename */ + /* construct filename */ + directory = !EMPTY(instantsave_target_dir) ? instantsave_target_dir : g_get_tmp_dir(); + new_filename = g_build_filename(directory, "gis_XXXXXX", NULL); + if (ft != NULL && !EMPTY(ft->extension)) SETPTR(new_filename, g_strconcat(new_filename, ".", ft->extension, NULL));
Great, you are uncovering very old bugs :). Should be fixed.