Analyse.diff (1,137 bytes)
Index: plugins.cpp
===================================================================
--- plugins.cpp (revision 7155)
+++ plugins.cpp (working copy)
@@ -775,11 +775,6 @@
break;
}
- if(Data)
- {
- delete[] Data;
- }
-
if (items.getCount() && (hResult != (HANDLE)-2))
{
bool OnlyOne = (items.getCount() == 1) && !(Name && Opt.PluginConfirm.OpenFilePlugin && Opt.PluginConfirm.StandardAssociation && Opt.PluginConfirm.EvenIfOnlyOnePlugin);
@@ -836,7 +831,13 @@
if (pResult && pResult->hPlugin == INVALID_HANDLE_VALUE)
{
- HANDLE h = pResult->pPlugin->Open(OPEN_ANALYSE, FarGuid, 0);
+ AnalyseInfo Info={sizeof(Info)};
+ Info.FileName = Name? Name->CPtr() : nullptr;
+ Info.Buffer = Data;
+ Info.BufferSize = DataSize;
+ Info.OpMode = OpMode|(Type==OFP_ALTERNATIVE?OPM_PGDN:0);
+
+ HANDLE h = pResult->pPlugin->Open(OPEN_ANALYSE, FarGuid, (INT_PTR)&Info);
if (h == (HANDLE)-2)
{
@@ -854,6 +855,11 @@
}
}
+ if(Data)
+ {
+ delete[] Data;
+ }
+
for (size_t i = 0; i < items.getCount(); i++)
{
PluginHandle *handle = items.getItem(i);