mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-12 22:20:35 +05:00
save check of file ending
This commit is contained in:
parent
20d6a12192
commit
ccc092d2c5
@ -410,9 +410,9 @@ namespace netgen
|
||||
void Mesh :: Save (const string & filename) const
|
||||
{
|
||||
ostream * outfile;
|
||||
if (filename.substr(filename.length()-7,7) == ".vol.gz")
|
||||
if (filename.find(".vol.gz")!=string::npos)
|
||||
outfile = new ogzstream(filename.c_str());
|
||||
else if (filename.substr(filename.length()-4,4) == ".vol")
|
||||
else if (filename.find(".vol")!=string::npos)
|
||||
outfile = new ofstream(filename.c_str());
|
||||
else
|
||||
outfile = new ogzstream((filename+".vol.gz").c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user