explicitly close tmpfiles before unlink.
authorRobin Gareus <robin@gareus.org>
Mon, 2 Mar 2015 22:12:06 +0000 (23:12 +0100)
committerRobin Gareus <robin@gareus.org>
Mon, 2 Mar 2015 22:12:06 +0000 (23:12 +0100)
fixes issue on export tmpfiles remaining on windows

libs/audiographer/audiographer/sndfile/tmp_file.h

index facb872abfe08feabeefd797a6ccaab1fb0f865b..8ea676c0d589a7b7247086f47eb31bc42cd0bc0e 100644 (file)
@@ -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());
                }