From 0eb97bcae784ae245b63529b8df9b3c53ed66feb Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 13 Mar 2012 20:15:37 +0000 Subject: [PATCH] use g_fopen() git-svn-id: svn://localhost/ardour2/branches/3.0@11670 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/sfdb_freesound_mootcher.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/sfdb_freesound_mootcher.cc b/gtk2_ardour/sfdb_freesound_mootcher.cc index 3b179d35ca..1444660a88 100644 --- a/gtk2_ardour/sfdb_freesound_mootcher.cc +++ b/gtk2_ardour/sfdb_freesound_mootcher.cc @@ -47,6 +47,9 @@ #include #include +#include +#include + #include "ardour/audio_library.h" static const std::string base_url = "http://www.freesound.org/api"; @@ -305,7 +308,7 @@ std::string Mootcher::getAudioFile(std::string originalFileName, std::string ID, std::string audioFileName = basePath + "snd/" + ID + "-" + originalFileName; // check to see if audio file already exists - FILE *testFile = fopen(audioFileName.c_str(), "r"); + FILE *testFile = g_fopen(audioFileName.c_str(), "r"); if (testFile) { fseek (testFile , 0 , SEEK_END); if (ftell (testFile) > 256) { @@ -325,7 +328,7 @@ std::string Mootcher::getAudioFile(std::string originalFileName, std::string ID, //now download the actual file FILE* theFile; - theFile = fopen( audioFileName.c_str(), "wb" ); + theFile = g_fopen( audioFileName.c_str(), "wb" ); if (!theFile) { return "";