Recognise .GIF and .gIf (ie. upper and mixed case extensions) in the target file...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 3 Feb 2008 10:19:26 +0000 (10:19 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 3 Feb 2008 10:19:26 +0000 (10:19 +0000)
git-svn-id: http://svn.voria.com/code@1561 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/tool/main.cpp

index 22f5a98..e595f42 100644 (file)
@@ -962,7 +962,17 @@ int main(int argc, char *argv[])
                                if(Target::ext_book().count(ext))
                                        target_name=Target::ext_book()[ext];
                                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];
+                                       else
+                                               target_name=ext;
+                               }
                        }
 
                        // If the target type is STILL not yet defined, then