fslogix icon indicating copy to clipboard operation
fslogix copied to clipboard

Very problematic when you continue this function.

Open ajdinaliu opened this issue 3 years ago • 0 comments

https://github.com/aaronparker/FSLogix/blob/033e83561769593e77fd08aba027fa81853ef422/Modules/Fslogix.Powershell.Disk/Private/Get-DiskInformation.ps1#L16

Get-DiskImage returns an error "The process cannot access the file because it is being used by another process.", if a user is logged on with the container in $Path.

You should change this to: Write-Error $Error[0] -ErrorAction Stop

Otherwise, functions like Get-FslDisk will fail, if a container is "in use"!

ajdinaliu avatar Nov 16 '20 14:11 ajdinaliu