mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +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
|
void Mesh :: Save (const string & filename) const
|
||||||
{
|
{
|
||||||
ostream * outfile;
|
ostream * outfile;
|
||||||
if (filename.substr(filename.length()-7,7) == ".vol.gz")
|
if (filename.find(".vol.gz")!=string::npos)
|
||||||
outfile = new ogzstream(filename.c_str());
|
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());
|
outfile = new ofstream(filename.c_str());
|
||||||
else
|
else
|
||||||
outfile = new ogzstream((filename+".vol.gz").c_str());
|
outfile = new ogzstream((filename+".vol.gz").c_str());
|
||||||
|
Loading…
Reference in New Issue
Block a user