At the point of opening AppleWin.chm, try to delete any Zone.Identifer alt data stream (fixes #437)

This commit is contained in:
tomcw 2017-08-14 21:23:49 +01:00
parent 9e7318e7ed
commit fb963148c2
1 changed files with 10 additions and 0 deletions

View File

@ -1815,6 +1815,16 @@ static void ProcessButtonClick(int button, bool bFromButtonUI /*=false*/)
TCHAR filename[MAX_PATH];
_tcscpy(filename,g_sProgramDir);
_tcscat(filename,TEXT("APPLEWIN.CHM"));
// (GH#437) For any internet downloaded AppleWin.chm files (stored on an NTFS drive) there may be an Alt Data Stream containing a Zone Identifier
// - try to delete it, otherwise the content won't be displayed unless it's unblock (via File Properties)
{
TCHAR filename_with_zone_identifier[MAX_PATH];
_tcscpy(filename_with_zone_identifier,filename);
_tcscat(filename_with_zone_identifier,TEXT(":Zone.Identifier"));
DeleteFile(filename_with_zone_identifier);
}
HtmlHelp(g_hFrameWindow,filename,HH_DISPLAY_TOC,0);
helpquit = 1;
}