diff options
author | Robin Gareus <robin@gareus.org> | 2015-03-02 23:12:06 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-03-02 23:12:06 +0100 |
commit | 5cfa389978044d57afe529f1a8503b3a948f6e44 (patch) | |
tree | d505447115041f0e35a9e94e3c7a84b7c5563279 | |
parent | a5eb3bae87c53cdc66f05fca0dfa412833b12cc2 (diff) |
explicitly close tmpfiles before unlink.
fixes issue on export tmpfiles remaining on windows
-rw-r--r-- | libs/audiographer/audiographer/sndfile/tmp_file.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/audiographer/audiographer/sndfile/tmp_file.h b/libs/audiographer/audiographer/sndfile/tmp_file.h index facb872abf..8ea676c0d5 100644 --- a/libs/audiographer/audiographer/sndfile/tmp_file.h +++ b/libs/audiographer/audiographer/sndfile/tmp_file.h @@ -34,6 +34,10 @@ class TmpFile : public SndfileWriter<T>, public SndfileReader<T> ~TmpFile() { + /* explicitly close first, some OS (yes I'm looking at you windows) + * cannot delet files that are still open + */ + SndfileBase::close(); if (!filename.empty()) { std::remove(filename.c_str()); } |