13
0

no need to close a file that will not be removed (and has no name)

This commit is contained in:
Paul Davis 2015-04-29 15:01:28 -04:00
parent 89f5e22896
commit 729bc00f13

View File

@ -37,8 +37,8 @@ class TmpFile : public SndfileWriter<T>, public SndfileReader<T>
/* explicitly close first, some OS (yes I'm looking at you windows)
* cannot delet files that are still open
*/
SndfileBase::close();
if (!filename.empty()) {
SndfileBase::close();
std::remove(filename.c_str());
}
}