From d5717873a0d94962ca58b297f1eaa0d57152e168 Mon Sep 17 00:00:00 2001 From: dooglus Date: Mon, 17 Sep 2007 22:39:21 +0000 Subject: [PATCH] Saving a document (I'm going to call them documents because I don't know what else to call them - I mean .sif or .sifz files) without specifying an extension should add the default extension (.sifz) to the name you specify, but that's not working if the full path includes a dot. This change fixes that bug. git-svn-id: http://svn.voria.com/code@700 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/instance.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/synfig-studio/trunk/src/gtkmm/instance.cpp b/synfig-studio/trunk/src/gtkmm/instance.cpp index 190eafb..7d9900d 100644 --- a/synfig-studio/trunk/src/gtkmm/instance.cpp +++ b/synfig-studio/trunk/src/gtkmm/instance.cpp @@ -265,7 +265,8 @@ studio::Instance::dialog_save_as() if(find(filename.begin(),filename.end(),'*')!=filename.end()) continue; - if(find(filename.begin(),filename.end(),'.')==filename.end()) + std::string base = basename(filename); + if(find(base.begin(),base.end(),'.')==base.end()) filename+=".sifz"; try -- 2.7.4