diff --git a/indexer/index.cpp b/indexer/index.cpp index ec00db4d9d..979b07c7bf 100644 --- a/indexer/index.cpp +++ b/indexer/index.cpp @@ -20,7 +20,7 @@ MwmValue::MwmValue(string const & name) string MwmValue::GetFileName() const { string s = m_cont.GetFileName(); - pl::GetNameFromURLRequest(s); + pl::GetNameFromPath(s); pl::GetNameWithoutExt(s); return s; } diff --git a/platform/file_name_utils.cpp b/platform/file_name_utils.cpp index d7b09b1106..888c90adc9 100644 --- a/platform/file_name_utils.cpp +++ b/platform/file_name_utils.cpp @@ -18,4 +18,9 @@ void GetNameFromURLRequest(string & name) name = name.substr(i+1); } +void GetNameFromPath(string & name) +{ + GetNameFromURLRequest(name); +} + } diff --git a/platform/file_name_utils.hpp b/platform/file_name_utils.hpp index 581adf95b7..5bbad6b31f 100644 --- a/platform/file_name_utils.hpp +++ b/platform/file_name_utils.hpp @@ -4,6 +4,12 @@ namespace pl { + /// Remove extension from file name. void GetNameWithoutExt(string & name); + + /// Get file name from download url. void GetNameFromURLRequest(string & name); + + /// Get file name from full path. + void GetNameFromPath(string & name); }