--- linuxsampler/trunk/src/common/Path.cpp 2009/10/23 17:12:01 2011 +++ linuxsampler/trunk/src/common/Path.cpp 2009/10/23 17:53:17 2012 @@ -261,7 +261,7 @@ } std::string Path::getBaseName(std::string path) { - Path p; + Path p; #if WIN32 p = fromWindows(path); #else @@ -278,4 +278,24 @@ return name.substr(0, lastdot); } +std::string Path::stripLastName() { + if (elements.size() > 0) elements.pop_back(); + #if WIN32 + return toWindows(); + #endif + + return toPosix(); +} + +std::string Path::stripLastName(std::string path) { + Path p; + #if WIN32 + p = fromWindows(path); + #else + p = fromPosix(path); + #endif + + return p.stripLastName(); +} + } // namespace LinuxSampler