Fix incorrect path

This commit is contained in:
Manuel Thalmann 2024-08-06 12:21:00 +02:00
parent faecb6cd53
commit 48f0097c45

View file

@ -21,7 +21,7 @@ function Remove-DesktopIcon {
$path = "Desktop/$Pattern"; $path = "Desktop/$Pattern";
foreach ($userDir in @($(~), $env:PUBLIC, "$env:SystemDrive/Users/Default")) { foreach ($userDir in @("~", $env:PUBLIC, "$env:SystemDrive/Users/Default")) {
$fullName = "$userDir/$path"; $fullName = "$userDir/$path";
if (Test-Path -PathType Leaf $fullName) { if (Test-Path -PathType Leaf $fullName) {