--- a/src/misc.cpp Wed Jul 17 18:59:28 2013 +0300 +++ b/src/misc.cpp Wed Jul 17 19:44:46 2013 +0300 @@ -8,4 +8,15 @@ // ----------------------------------------------------------------------------- str binaryConfigName( str ver ) { return fmt( "binaries/%1", ver ); +} + +// ============================================================================= +// ----------------------------------------------------------------------------- +str basename( str path ) { + long lastpos = path.lastIndexOf( "/" ); + + if( lastpos != -1 ) + return path.mid( lastpos + 1 ); + + return path; } \ No newline at end of file