lock improvement
This commit is contained in:
parent
be3fc54268
commit
f545187cfb
5 changed files with 14 additions and 19 deletions
|
|
@ -22,7 +22,8 @@ function new-lock {
|
|||
}
|
||||
else {
|
||||
try {
|
||||
New-Item -ItemType File -Path $lockFile | Out-Null
|
||||
$content = if ($by) { $by } else { "" }
|
||||
New-Item -ItemType File -Path $lockFile -Value $content
|
||||
$lock = $false
|
||||
}
|
||||
catch {
|
||||
|
|
@ -36,10 +37,6 @@ function new-lock {
|
|||
}
|
||||
$i++
|
||||
}
|
||||
if ($by) {
|
||||
$by | Out-File -FilePath $lockFile -Append
|
||||
}
|
||||
|
||||
}
|
||||
function remove-lock {
|
||||
Write-Output 'Removing lock'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue