From e87dda5c745fec63d1034aac774f825d07b9e86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Sun, 25 Oct 2009 11:43:21 +0000 Subject: [PATCH] Fix adding the filetype's default extension when using the Instant Save plugin (2885142). git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4358 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- ChangeLog | 7 +++++++ plugins/saveactions.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f0746a42..191729da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-10-25 Enrico Tröger + + * plugins/saveactions.c: + Fix adding the filetype's default extension when using the + Instant Save plugin (2885142). + + 2009-10-23 Nick Treleaven * src/interface.c, src/ui_utils.h, src/prefs.c, src/keyfile.c, diff --git a/plugins/saveactions.c b/plugins/saveactions.c index f7da3389..5da58f78 100644 --- a/plugins/saveactions.c +++ b/plugins/saveactions.c @@ -250,7 +250,7 @@ static void instantsave_document_new_cb(GObject *obj, GeanyDocument *doc, gpoint if (fd != -1) close(fd); /* close the returned file descriptor as we only need the filename */ - if (ft == NULL) + 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);