And another one

This commit is contained in:
Andreas Fabri 2024-10-10 13:25:36 +01:00
parent 1d6b81d015
commit 98d649fe8b
1 changed files with 2 additions and 3 deletions

View File

@ -13,7 +13,6 @@
#include <CGAL/Random.h>
#include <CGAL/point_generators_2.h>
#include <CGAL/random_polygon_2.h>
#include <CGAL/IO/helpers.h>
#include <CGAL/enum.h>
#include <fstream>
@ -110,8 +109,8 @@ template <typename PolygonWithHoles>
bool read_input_polygon(const char* filename,
PolygonWithHoles& p)
{
std::string ext = CGAL::IO::internal::get_file_extension(filename);
if(ext == "dat")
std::string ext = std::filesystem::path(filename).extension().string();
if(ext == ".dat")
{
return read_dat_polygon(filename, p);
}