Skip to content

Commit

Permalink
At the point of opening AppleWin.chm, try to delete any Zone.Identife…
Browse files Browse the repository at this point in the history
…r alt data stream (fixes #437)
  • Loading branch information
tomcw committed Aug 14, 2017
1 parent 9e7318e commit fb96314
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions source/Frame.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit fb96314

Please sign in to comment.