Added my "Copyright (c) 2007" notices, for files I edited in 2007.
[synfig.git] / synfig-core / trunk / src / tool / main.cpp
index 22f5a98..c5b7dbc 100644 (file)
@@ -960,9 +960,25 @@ int main(int argc, char *argv[])
                                string ext = filename_extension(job_list.front().outfilename);
                                if (ext.length()) ext = ext.substr(1);
                                if(Target::ext_book().count(ext))
+                               {
                                        target_name=Target::ext_book()[ext];
+                                       info("target name not specified - using %s", target_name.c_str());
+                               }
                                else
-                                       target_name=ext;
+                               {
+                                       string lower_ext(ext);
+
+                                       for(unsigned int i=0;i<ext.length();i++)
+                                               lower_ext[i] = tolower(ext[i]);
+
+                                       if(Target::ext_book().count(lower_ext))
+                                       {
+                                               target_name=Target::ext_book()[lower_ext];
+                                               info("target name not specified - using %s", target_name.c_str());
+                                       }
+                                       else
+                                               target_name=ext;
+                               }
                        }
 
                        // If the target type is STILL not yet defined, then