From fb963148c2daad0363133f43125fee6673f1ffb1 Mon Sep 17 00:00:00 2001 From: tomcw Date: Mon, 14 Aug 2017 21:23:49 +0100 Subject: [PATCH] At the point of opening AppleWin.chm, try to delete any Zone.Identifer alt data stream (fixes #437) --- source/Frame.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/Frame.cpp b/source/Frame.cpp index d3f04f4d..338d6e23 100644 --- a/source/Frame.cpp +++ b/source/Frame.cpp @@ -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; }