Skip to content

Commit

Permalink
Revert "[SHELL32] Move to/Copy to folder should not be displayed when…
Browse files Browse the repository at this point in the history
… unable to retrieve the file name"

This reverts commit a217e83.
  • Loading branch information
TAN-Gaming committed May 16, 2023
1 parent a217e83 commit f687117
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions dll/win32/shell32/CCopyToMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ HRESULT CCopyToMenu::DoRealCopy(LPCMINVOKECOMMANDINFO lpici, LPCITEMIDLIST pidl)

CStringW CCopyToMenu::DoGetFileTitle()
{
CStringW ret;
CStringW ret = L"(file)";

CDataObjectHIDA pCIDA(m_pDataObject);
if (FAILED_UNEXPECTEDLY(pCIDA.hr()))
Expand Down Expand Up @@ -240,9 +240,6 @@ HRESULT CCopyToMenu::DoCopyToFolder(LPCMINVOKECOMMANDINFO lpici)
}

CStringW strFileTitle = DoGetFileTitle();
if (strFileTitle.IsEmpty())
return hr;

CStringW strTitle;
strTitle.Format(IDS_COPYTOTITLE, static_cast<LPCWSTR>(strFileTitle));

Expand Down
5 changes: 1 addition & 4 deletions dll/win32/shell32/CMoveToMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ HRESULT CMoveToMenu::DoRealMove(LPCMINVOKECOMMANDINFO lpici, LPCITEMIDLIST pidl)

CStringW CMoveToMenu::DoGetFileTitle()
{
CStringW ret;
CStringW ret = L"(file)";

CDataObjectHIDA pCIDA(m_pDataObject);
if (FAILED_UNEXPECTEDLY(pCIDA.hr()))
Expand Down Expand Up @@ -239,9 +239,6 @@ HRESULT CMoveToMenu::DoMoveToFolder(LPCMINVOKECOMMANDINFO lpici)
}

CStringW strFileTitle = DoGetFileTitle();
if (strFileTitle.IsEmpty())
return hr;

CStringW strTitle;
strTitle.Format(IDS_MOVETOTITLE, static_cast<LPCWSTR>(strFileTitle));

Expand Down

0 comments on commit f687117

Please sign in to comment.