Skip to content

Commit

Permalink
24.10.9 Some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tablacus committed Oct 9, 2024
1 parent 6449409 commit c8f892e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Debug/script/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ g_.Notify = {};

AboutTE = function (n) {
if (n == 0) {
return te.Version < 20240616 ? te.Version : 20241008;
return te.Version < 20240616 ? te.Version : 20241009;
}
if (n == 1) {
const v = AboutTE(0);
Expand Down Expand Up @@ -2573,7 +2573,7 @@ ExecMenu4 = function (Ctrl, Name, pt, hMenu, arContextMenu, nVerb, FV) {
}
}
const Items = ContextMenu.Items();
if (ContextMenu.InvokeCommand(0, te.hwnd, nVerb - ContextMenu.idCmdFirst, null, Items ? Items.Item(-1).Path : null, SW_SHOWNORMAL, 0, 0) == S_OK) {
if (ContextMenu.InvokeCommand(0, te.hwnd, nVerb - ContextMenu.idCmdFirst, null, Items ? (Items.Item(-1) || {}).Path : null, SW_SHOWNORMAL, 0, 0) == S_OK) {
api.DestroyMenu(hMenu);
return S_OK;
}
Expand Down Expand Up @@ -3222,7 +3222,7 @@ PopupContextMenu = function (Item, FV, pt) {
}
const nVerb = api.TrackPopupMenuEx(hMenu, TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, te.hwnd, null, ContextMenu);
if (nVerb) {
ContextMenu.InvokeCommand(0, te.hwnd, nVerb - 1, null, Item.Item(-1).Path, SW_SHOWNORMAL, 0, 0);
ContextMenu.InvokeCommand(0, te.hwnd, nVerb - 1, null, Item ? (Item.Item(-1) || {}).Path : null, SW_SHOWNORMAL, 0, 0);
}
}
api.DestroyMenu(hMenu);
Expand Down
4 changes: 2 additions & 2 deletions Debug/script/sync1.js
Original file line number Diff line number Diff line change
Expand Up @@ -2294,7 +2294,7 @@ te.OnDefaultCommand = function (Ctrl) {
return S_OK;
}
}
return InvokeCommand(Selected, 0, te.hwnd, null, null, Selected.Item(-1).Path, SW_SHOWNORMAL, 0, 0, Ctrl, CMF_DEFAULTONLY);
return InvokeCommand(Selected, 0, te.hwnd, null, null, (Selected.Item(-1) || {}).Path, SW_SHOWNORMAL, 0, 0, Ctrl, CMF_DEFAULTONLY);
}
return S_FALSE;
}
Expand Down Expand Up @@ -3330,7 +3330,7 @@ AddEvent("BeginNavigate", function (Ctrl) {
});

AddEvent("UseExplorer", function (pid) {
if (pid && pid.Path && !/^ftp:|^https?:/i.test(pid.Path) && !pid.Unavailable && !api.GetAttributesOf(pid.Alt || pid, SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR | SFGAO_STORAGEANCESTOR | SFGAO_NONENUMERATED | SFGAO_STORAGE) && !api.ILIsParent(1, pid, false) && !IsSearchPath(pid) && api.GetDisplayNameOf(pid, SHGDN_FORPARSING) != "::{F874310E-B6B7-47DC-BC84-B9E6B38F5903}") {
if (pid && pid.Path && !/^ftp:|^https?:/i.test(pid.Path) && !pid.Unavailable && !api.GetAttributesOf(pid.Alt || pid, SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR | SFGAO_STORAGEANCESTOR | SFGAO_NONENUMERATED | SFGAO_DROPTARGET | SFGAO_STORAGE) && !api.ILIsParent(1, pid, false) && !IsSearchPath(pid) && api.GetDisplayNameOf(pid, SHGDN_FORPARSING) != "::{F874310E-B6B7-47DC-BC84-B9E6B38F5903}") {
return true;
}
});
Expand Down

0 comments on commit c8f892e

Please sign in to comment.