From 5edd595ea2319f0c083c7a8a8b758bec36ad2a33 Mon Sep 17 00:00:00 2001 From: oehhar Date: Mon, 27 Jan 2025 14:24:36 +0000 Subject: [PATCH 1/2] Ticket [27fa20249d]: htmlhelp: ignore pckgs folders without configure.in/ac --- tools/tcltk-man2html.tcl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 911639488a7..fd066e11027 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -688,6 +688,9 @@ try { break } } + } on error {} { + puts "package folder without package ignored: $dir" + continue } finally { catch {close $f; unset f} } From 5a9b2f09ddd894b869c2bd989af746a501ae12aa Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Tue, 28 Jan 2025 05:24:52 +0000 Subject: [PATCH 2/2] Cherry pick fix for [4f0b5767ac]. Exec of App Execution Aliases on Windows --- tests/exec.test | 11 +++++++++++ win/tclWinPipe.c | 13 ++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/tests/exec.test b/tests/exec.test index e77a0ac4ad6..ff32799dbea 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -23,6 +23,12 @@ source [file join [file dirname [info script]] tcltests.tcl] # Some skips when running in a macOS CI environment testConstraint noosxCI [expr {![info exists ::env(MAC_CI)]}] +# Need a App Exec Alias for testing exec of reparse points +if {[info exists ::env(LOCALAPPDATA)] && + [file exists [file join $::env(LOCALAPPDATA) "Microsoft" "WindowsApps" "winget.exe"]]} { + testConstraint haveWinget 1 +} + unset -nocomplain path # Utilities that are like Bourne shell stalwarts, but cross-platform. @@ -706,6 +712,11 @@ test exec-20.1 {exec .CMD file} -constraints {win} -body { exec [makeFile "echo %1> $log" exec201.CMD] "Testing exec-20.1" viewFile $log } -result "\"Testing exec-20.1\"" + +test exec-bug-4f0b5767ac {exec App Execution Alias} -constraints haveWinget -body { + exec winget --info +} -result "Windows Package Manager*" -match glob + # ---------------------------------------------------------------------- # cleanup diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 229f67032f5..869ff2b8f89 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -1320,11 +1320,22 @@ ApplicationType( hFile = CreateFileW(nativeFullPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL); + FILE_ATTRIBUTE_NORMAL|FILE_FLAG_OPEN_REPARSE_POINT, NULL); if (hFile == INVALID_HANDLE_VALUE) { continue; } + if (attr & FILE_ATTRIBUTE_REPARSE_POINT) { + /* + * But [4f0b5767ac]. Likely a App Execution Alias. This can only + * be a Win32 APP. Attempt to ReadFile below will fail. We assume + * that if it is on the PATH, and it is a reparse point, it is an + * App Execution Alias. + */ + applType = APPL_WIN32; + break; + } + header.e_magic = 0; ReadFile(hFile, (void *) &header, sizeof(header), &read, NULL); if (header.e_magic != IMAGE_DOS_SIGNATURE) {