correctly access file extension via boost::filesystem
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 5 Oct 2025 20:04:07 +0000 (22:04 +0200)
committerDrew Parsons <dparsons@debian.org>
Sun, 5 Oct 2025 20:04:07 +0000 (22:04 +0200)
Extension() is a method for a path object.

Last-Update: 2025-09-22
Forwarded: https://bitbucket.org/fenics-project/mshr/pull-requests/19

Gbp-Pq: Name boost_filesystem_extension.patch

app/mshrable.cpp

index 1f90a9e4017eccfa325f6d0956490816191fd366..e663bbedd42c84c76cc40c22711943332a274c11 100644 (file)
@@ -125,7 +125,7 @@ int main(int argc, char** argv)
 
     if (vm.count("polyout"))
     {
-      std::string extension = boost::filesystem::extension(vm["polyout"].as<std::string>());
+      std::string extension = boost::filesystem::path(vm["polyout"].as<std::string>()).extension().string();
 
       if (extension != ".off")
       {