diff options
author | Ben Loftis <ben@glw.com> | 2008-03-26 19:10:14 +0000 |
---|---|---|
committer | Ben Loftis <ben@glw.com> | 2008-03-26 19:10:14 +0000 |
commit | 5b99530ed4e08c679026b66bf4feb351645b687d (patch) | |
tree | e024b1b8af743be543f7bb3a3d52a7d6a4da583b | |
parent | 019a35b2ac375bc150d3170193a5421834d22c5a (diff) |
need to create the Freesound dir if it does not already exist
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3189 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/sfdb_freesound_mootcher.cc | 17 | ||||
-rw-r--r-- | gtk2_ardour/sfdb_freesound_mootcher.h | 1 |
2 files changed, 7 insertions, 11 deletions
diff --git a/gtk2_ardour/sfdb_freesound_mootcher.cc b/gtk2_ardour/sfdb_freesound_mootcher.cc index 484df19941..ba9b4052c8 100644 --- a/gtk2_ardour/sfdb_freesound_mootcher.cc +++ b/gtk2_ardour/sfdb_freesound_mootcher.cc @@ -75,17 +75,14 @@ const char* Mootcher::changeWorkingDir(const char *saveLocation) //
int pos2 = basePath.find_last_of("/");
if(basePath.length() != (pos2+1)) basePath += "/";
- // add a check if the given directory exists
- createResourceLocation();
- return basePath.c_str();
-}
+
+ // create Freesound directory and sound dir
+ std::string sndLocation = basePath;
+ mkdir(sndLocation.c_str(), 0x777);
+ sndLocation += "snd";
+ mkdir(sndLocation.c_str(), 0x777);
-//------------------------------------------------------------------------
-void Mootcher::createResourceLocation()
-{
- // create a snd directory
- std::string sndLocation = basePath + "snd";
- mkdir(sndLocation.c_str(), 0x777);
+ return basePath.c_str();
}
//------------------------------------------------------------------------
diff --git a/gtk2_ardour/sfdb_freesound_mootcher.h b/gtk2_ardour/sfdb_freesound_mootcher.h index af5f4e0bab..3cfbd414d4 100644 --- a/gtk2_ardour/sfdb_freesound_mootcher.h +++ b/gtk2_ardour/sfdb_freesound_mootcher.h @@ -55,7 +55,6 @@ public: private:
const char* changeWorkingDir(const char *saveLocation);
- void createResourceLocation();
std::string getXmlFile(std::string ID, int &length);
void GetXml(std::string ID, struct MemoryStruct &xml_page);
|