[DEBUG] correct etk toLower

This commit is contained in:
Edouard DUPIN 2018-06-19 21:18:39 +02:00
parent 2033bf86ee
commit e94abc47f3
3 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ bool pushVideoFile(zeus::service::ProxyVideo& _srv, etk::String _path, etk::Map<
etk::String extention; etk::String extention;
if ( _path.rfind('.') != etk::String::npos if ( _path.rfind('.') != etk::String::npos
&& _path.rfind('.') != 0) { && _path.rfind('.') != 0) {
extention = etk::tolower(etk::String(_path.begin()+_path.rfind('.')+1, _path.end())); extention = etk::toLower(etk::String(_path.begin()+_path.rfind('.')+1, _path.end()));
} }
etk::String fileName = etk::split(_path, '/').back(); etk::String fileName = etk::split(_path, '/').back();
// internal extention ... // internal extention ...

View File

@ -188,7 +188,7 @@ static etk::Vector<etk::Pair<etk::String, etk::String>> getMimeList() {
}; };
etk::String zeus::getMineType(etk::String _extention) { etk::String zeus::getMineType(etk::String _extention) {
_extention = etk::tolower(_extention); _extention = etk::toLower(_extention);
for (auto &it : getMimeList()) { for (auto &it : getMimeList()) {
if (it.first == _extention) { if (it.first == _extention) {
return it.second; return it.second;
@ -201,7 +201,7 @@ etk::String zeus::getMineType(etk::String _extention) {
} }
etk::String zeus::getExtention(etk::String _mineType) { etk::String zeus::getExtention(etk::String _mineType) {
_mineType = etk::tolower(_mineType); _mineType = etk::toLower(_mineType);
for (auto &it : getMimeList()) { for (auto &it : getMimeList()) {
if (it.second == _mineType) { if (it.second == _mineType) {
return it.first; return it.first;

View File

@ -62,7 +62,7 @@ zeus::MediaImpl::MediaImpl(uint64_t _id, const etk::String& _fileNameReal, const
etk::String extention; etk::String extention;
if ( m_fileName.rfind('.') != etk::String::npos if ( m_fileName.rfind('.') != etk::String::npos
&& m_fileName.rfind('.') != 0) { && m_fileName.rfind('.') != 0) {
extention = etk::tolower(etk::String(m_fileName.begin()+m_fileName.rfind('.')+1, m_fileName.end())); extention = etk::toLower(etk::String(m_fileName.begin()+m_fileName.rfind('.')+1, m_fileName.end()));
m_fileName = etk::String(m_fileName.begin(), m_fileName.begin()+m_fileName.rfind('.')); m_fileName = etk::String(m_fileName.begin(), m_fileName.begin()+m_fileName.rfind('.'));
} }
if (extention != "") { if (extention != "") {