diff --git a/src/cmdlib.cpp b/src/cmdlib.cpp index af89cb3522..b313f56914 100644 --- a/src/cmdlib.cpp +++ b/src/cmdlib.cpp @@ -195,33 +195,6 @@ bool DirEntryExists(const char *pathname, bool *isdir) return res; } -//========================================================================== -// -// DefaultExtension -- char array version -// -// Appends the extension to a pathname if it does not already have one. -// -//========================================================================== - -void DefaultExtension (char *path, const char *extension) -{ - char *src; -// -// if path doesn't have a .EXT, append extension -// (extension should include the .) -// - src = path + strlen(path) - 1; - - while (src != path && !IsSeperator(*src)) - { - if (*src == '.') - return; // it has an extension - src--; - } - - strcat (path, extension); -} - //========================================================================== // // DefaultExtension -- FString version diff --git a/src/cmdlib.h b/src/cmdlib.h index 7a5fa21a6b..d187b43cf8 100644 --- a/src/cmdlib.h +++ b/src/cmdlib.h @@ -27,7 +27,6 @@ extern FString progdir; void FixPathSeperator (char *path); static void inline FixPathSeperator (FString &path) { path.ReplaceChars('\\', '/'); } -void DefaultExtension (char *path, const char *extension); void DefaultExtension (FString &path, const char *extension); FString ExtractFilePath (const char *path);