]> git.mxchange.org Git - simgear.git/commitdiff
Restore the special capability of the btg reader to read compressed files.
authorfrohlich <frohlich>
Tue, 19 May 2009 05:30:16 +0000 (05:30 +0000)
committerTim Moore <timoore@redhat.com>
Tue, 19 May 2009 21:53:24 +0000 (23:53 +0200)
Modified Files:
  scene/tgdb/SGReaderWriterBTG.cxx
  scene/tgdb/SGReaderWriterBTG.hxx

simgear/scene/tgdb/SGReaderWriterBTG.cxx
simgear/scene/tgdb/SGReaderWriterBTG.hxx

index 1fa3e9818ac47c9aa09d864f40782de654d1e1c7..90341f96e18d138ca27ec01961b9cf590e11f400 100644 (file)
@@ -45,6 +45,15 @@ const char* SGReaderWriterBTG::className() const
     return "BTG Database reader";
 }
 
+bool
+SGReaderWriterBTG::acceptsExtension(const std::string& extension) const
+{
+    std::string lowercase_ext = osgDB::convertToLowerCase(extension);
+    if (lowercase_ext == "gz")
+        return true;
+    return osgDB::ReaderWriter::acceptsExtension(extension);
+}
+
 osgDB::ReaderWriter::ReadResult
 SGReaderWriterBTG::readNode(const std::string& fileName,
                             const osgDB::ReaderWriter::Options* options) const
index ca5f4a73f20fa61f69b7d459e30f09b6b79f2075..a28ea7eb5d9d773f7fd730123332c985f854e607 100644 (file)
@@ -28,6 +28,7 @@ public:
 
     virtual const char* className() const;
  
+    virtual bool acceptsExtension(const std::string& /*extension*/) const;
     virtual ReadResult readNode(const std::string& fileName,
                                 const osgDB::ReaderWriter::Options* options)
         const;