mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-11 05:29:55 +00:00
At the point of opening AppleWin.chm, try to delete any Zone.Identifer alt data stream (fixes #437)
This commit is contained in:
parent
9e7318e7ed
commit
fb963148c2
@ -1815,6 +1815,16 @@ static void ProcessButtonClick(int button, bool bFromButtonUI /*=false*/)
|
|||||||
TCHAR filename[MAX_PATH];
|
TCHAR filename[MAX_PATH];
|
||||||
_tcscpy(filename,g_sProgramDir);
|
_tcscpy(filename,g_sProgramDir);
|
||||||
_tcscat(filename,TEXT("APPLEWIN.CHM"));
|
_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);
|
HtmlHelp(g_hFrameWindow,filename,HH_DISPLAY_TOC,0);
|
||||||
helpquit = 1;
|
helpquit = 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user