summaryrefslogtreecommitdiff
path: root/gtk2_ardour/sfdb_freesound_mootcher.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/sfdb_freesound_mootcher.cc')
-rw-r--r--gtk2_ardour/sfdb_freesound_mootcher.cc17
1 files changed, 7 insertions, 10 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();
}
//------------------------------------------------------------------------