summaryrefslogtreecommitdiff
path: root/gtk2_ardour/sfdb_freesound_mootcher.cc
diff options
context:
space:
mode:
authorBen Loftis <ben@glw.com>2008-03-26 19:10:14 +0000
committerBen Loftis <ben@glw.com>2008-03-26 19:10:14 +0000
commit5b99530ed4e08c679026b66bf4feb351645b687d (patch)
treee024b1b8af743be543f7bb3a3d52a7d6a4da583b /gtk2_ardour/sfdb_freesound_mootcher.cc
parent019a35b2ac375bc150d3170193a5421834d22c5a (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
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();
}
//------------------------------------------------------------------------