diff --git a/Source/Utility/include/Utility/PathManip.h b/Source/Utility/include/Utility/PathManip.h index e16aa2dff..04b73aaab 100644 --- a/Source/Utility/include/Utility/PathManip.h +++ b/Source/Utility/include/Utility/PathManip.h @@ -35,12 +35,6 @@ bool GetDirectoryContainingItemFromRelPath(const char *_path, char *_buf); */ bool GetExtensionFromPath(const char *_path, char *_buf); -/** - * GetExtensionFromRelPath can work with absolute path and paths like "filename.txt" - * It will not extract extensions from filenames like ".filename" or "filename." - */ -bool GetExtensionFromRelPath(const char *_path, char *_buf); - // prefer PathManip::EnsureTrailingSlash() instead, semantically equal inline std::string EnsureTrailingSlash(std::string _s) { diff --git a/Source/Utility/source/PathManip.cpp b/Source/Utility/source/PathManip.cpp index 3bdd57b14..2fa13e134 100644 --- a/Source/Utility/source/PathManip.cpp +++ b/Source/Utility/source/PathManip.cpp @@ -64,33 +64,6 @@ bool GetExtensionFromPath(const char *_path, char *_buf) return true; } -bool GetExtensionFromRelPath(const char *_path, char *_buf) -{ - const char *last_sl = strrchr(_path, '/'); - const char *last_dot = strrchr(_path, '.'); - if( last_dot == nullptr ) - return false; - - if( last_sl ) { - if( last_dot == last_sl + 1 ) - return false; - if( last_dot == _path + strlen(_path) - 1 ) - return false; - if( last_dot < last_sl ) - return false; - strcpy(_buf, last_dot + 1); - return true; - } - else { - if( last_dot == _path ) - return false; - if( last_dot == _path + strlen(_path) - 1 ) - return false; - strcpy(_buf, last_dot + 1); - return true; - } -} - bool GetDirectoryNameFromPath(const char *_path, char *_dir_out, [[maybe_unused]] size_t _dir_size) { const char *second_sep = strrchr(_path, '/');