Mercurial > hg > vamp-plugin-sdk
comparison src/vamp-hostsdk/Files.cpp @ 403:732afc16cdd6
And a further win32 fix
author | Chris Cannam |
---|---|
date | Tue, 16 Jun 2015 13:01:59 +0100 |
parents | 06988ce35ff0 |
children | 67704de2bb54 |
comparison
equal
deleted
inserted
replaced
402:f23dd109144f | 403:732afc16cdd6 |
---|---|
172 string basename(path); | 172 string basename(path); |
173 | 173 |
174 string::size_type li = basename.rfind('/'); | 174 string::size_type li = basename.rfind('/'); |
175 if (li != string::npos) basename = basename.substr(li + 1); | 175 if (li != string::npos) basename = basename.substr(li + 1); |
176 | 176 |
177 #ifdef _WIN32 | |
178 string::size_type li = basename.rfind('\\'); | |
179 if (li != string::npos) basename = basename.substr(li + 1); | |
180 #endif | |
181 | |
177 li = basename.find('.'); | 182 li = basename.find('.'); |
178 if (li != string::npos) basename = basename.substr(0, li); | 183 if (li != string::npos) basename = basename.substr(0, li); |
179 | 184 |
180 for (size_t i = 0; i < basename.length(); ++i) { | 185 for (size_t i = 0; i < basename.length(); ++i) { |
181 basename[i] = tolower(basename[i]); | 186 basename[i] = tolower(basename[i]); |