Skip to content

Commit

Permalink
DSUtil: удалена функция AddExtension.
Browse files Browse the repository at this point in the history
  • Loading branch information
v0lt committed Sep 13, 2024
1 parent d565a77 commit 0ed3df9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
8 changes: 0 additions & 8 deletions src/DSUtil/FileHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,6 @@ CStringW GetRenameFileExt(LPCWSTR Path, LPCWSTR newExt)
return newPath;
}

CStringW AddExtension(LPCWSTR Path, LPCWSTR Ext)
{
CStringW cs = Path;
::PathAddExtensionW(cs.GetBuffer(MAX_PATH), Ext);
cs.ReleaseBuffer(-1);
return cs;
}

void CombineFilePath(CStringW& path, LPCWSTR file)
{
if (file) {
Expand Down
2 changes: 0 additions & 2 deletions src/DSUtil/FileHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ void RenameFileExt(CStringW& Path, LPCWSTR newExt);
// creates a new path with a new file extension
CStringW GetRenameFileExt(LPCWSTR Path, LPCWSTR newExt);

CStringW AddExtension(LPCWSTR Path, LPCWSTR Ext);

void CombineFilePath(CStringW& path, LPCWSTR file);
CStringW GetCombineFilePath(LPCWSTR dir, LPCWSTR file);

Expand Down
4 changes: 2 additions & 2 deletions src/apps/mplayerc/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6047,8 +6047,8 @@ void CMainFrame::OnFileSaveAs()
}

CStringW savedFileName(fd.GetPathName());
if (ext.GetLength()) {
savedFileName = AddExtension(savedFileName, ext);
if (ext.GetLength() && GetFileExt(savedFileName).IsEmpty()) {
savedFileName.Append(ext);
}

OAFilterState fs = State_Stopped;
Expand Down

0 comments on commit 0ed3df9

Please sign in to comment.