1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-02 16:49:41 +02:00

No need to call Flush() on a file opened for read

This commit is contained in:
Leland Lucius 2020-04-05 12:43:37 -05:00
parent 61abb87a77
commit 029a7aecff

View File

@ -202,7 +202,12 @@ int ufile_close(AVIOContext *pb)
bool success = true;
if (f) {
success = f->Flush() && f->Close();
if (pb->write_flag) {
success = f->Flush();
}
if (success) {
success = f->Close();
}
pb->opaque = nullptr;
}