mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 13:04:59 +02:00
Improve usage of test-path
This commit is contained in:
@ -14,7 +14,7 @@ try {
|
||||
$User = $(whoami)
|
||||
$Line = "$Time,$User,$Text"
|
||||
|
||||
if (-not(test-path "$Path")) {
|
||||
if (-not(test-path "$Path" -pathType leaf)) {
|
||||
write-output "Time,User,Text" > "$Path"
|
||||
}
|
||||
write-output $Line >> "$Path"
|
||||
|
Reference in New Issue
Block a user