Skip to content

Commit

Permalink
24.10.7 Some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tablacus committed Oct 7, 2024
1 parent fded27d commit 0ed74e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 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 : 20241006;
return te.Version < 20240616 ? te.Version : 20241007;
}
if (n == 1) {
const v = AboutTE(0);
Expand Down Expand Up @@ -3295,10 +3295,12 @@ OpenInExplorer = function (pid1) {
CancelWindowRegistered();
const pid = pid1.FolderItem || pid1;
if (pid) {
const path = api.ILIsEmpty(pid) ? "shell:Desktop" : api.GetDisplayNameOf(pid, SHGDN_FORPARSING | SHGDN_FORPARSINGEX);
if (/^[A-Z]:\\|^\\\\\w|^::{.*}$/i.test(path)) {
api.CreateProcess(GetWindowsPath("explorer.exe") + " " + PathQuoteSpaces(path));
return;
if (!api.ILIsEmpty(pid)) {
const path = api.GetDisplayNameOf(pid, SHGDN_FORPARSING | SHGDN_FORPARSINGEX);
if (/^[A-Z]:\\|^\\\\\w|^::{[^}]+}$/i.test(path)) {
api.CreateProcess(GetWindowsPath("explorer.exe") + " " + PathQuoteSpaces(path));
return;
}
}
sha.Explore(pid);
}
Expand Down
2 changes: 1 addition & 1 deletion Debug/script/sync1.js
Original file line number Diff line number Diff line change
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_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_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 0ed74e2

Please sign in to comment.