Skip to content

Commit d513223

Browse files
committed
bump version 2.5.1
1 parent fef6d64 commit d513223

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

powershell/yt-download.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ param(
88
[switch]$Man
99
)
1010

11-
$ScriptVersion = "2.5.0"
11+
$ScriptVersion = "2.6.0"
1212

1313
<#*==========================================================================
1414
* ℹ PARAMETERS
@@ -901,25 +901,25 @@ public static extern void CoTaskMemFree(IntPtr pv);
901901
process {
902902
try {
903903
$AbsolutePath = (Resolve-Path -Path $FilePath -ErrorAction Stop).Path
904-
# 1. Obtenir le PIDL (Pointer to an Item ID List) du fichier ciblé
904+
# 1. Obtain the PIDL (Pointer to an Item ID List) of the targeted file
905905
$Pidl = [IntPtr]::Zero
906906
$SfgaoOut = 0
907907
$Result = $ShUtils::SHParseDisplayName($AbsolutePath, [IntPtr]::Zero, [ref]$Pidl, 0, [ref]$SfgaoOut)
908908

909909
if ($Result -eq 0 -and $Pidl -ne [IntPtr]::Zero) {
910910
try {
911-
# 2. Appeler l'API native.
911+
# 2. Call the native API.
912912
[void]$ShUtils::SHOpenFolderAndSelectItems($Pidl, 0, $null, 0)
913913
}
914914
finally {
915-
# 3. Libérer la mémoire managée requise par l'API COM/Shell
915+
# 3. Free managed memory required by COM/Shell API
916916
if ($Pidl -ne [IntPtr]::Zero) {
917917
$ShUtils::CoTaskMemFree($Pidl)
918918
}
919919
}
920920
}
921921
else {
922-
# Sécurité si l'API échoue : retour à la méthode basique
922+
# Security if the API fails: return to the basic method
923923
Start-Process explorer.exe -ArgumentList "/select,`"$AbsolutePath`""
924924
}
925925
}

0 commit comments

Comments
 (0)