Context
- on win11 for arm
- on a shared network folder
V:\
- using a canonical path:
\\?\UNC\Mac\workspaces\rust\cargo-generate-org\target
PS v:\rust\putzen> cargo run -- ..\cargo-generate-org\
Start cleaning at \\?\UNC\Mac\workspaces\rust\cargo-generate-org
\\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\target (1.7GiB)
├─ because of ..\Cargo.toml
✔ ├─ delete directory recursively? · yes
rm: \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\target
thread 'main' panicked at 'Foo bar bak: Os { code: 87, kind: InvalidInput, message: "The parameter is incorrect." }', v:\rust\putzen\src\cleaner.rs:20:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\putzen.exe ..\cargo-generate-org\` (exit code: 101)
also rm in power shell fails though:
PS v:\rust\putzen> rm \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\target
Confirm
The item at Microsoft.PowerShell.Core\FileSystem::\\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\target
has children and the Recurse parameter was not specified. If you continue, all children will be removed with the item.
Are you sure you want to continue?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): A
rm : Cannot remove item \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\target\release\.fingerprint: You
do not have sufficient access rights to perform this operation.
At line:1 char:1
+ rm \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\targ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (.fingerprint:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
rm : Cannot remove item \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\target\release\.cargo-lock: You
do not have sufficient access rights to perform this operation.
At line:1 char:1
+ rm \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\targ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (.cargo-lock:FileInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
rm : Directory \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\target\release cannot be removed because
it is not empty.
At line:1 char:1
+ rm \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\targ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (release:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : DirectoryNotEmpty,Microsoft.PowerShell.Commands.RemoveItemCommand
rm : Cannot remove item \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\target\debug\.fingerprint: You do
not have sufficient access rights to perform this operation.
At line:1 char:1
+ rm \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\targ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (.fingerprint:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
rm : Cannot remove item \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\target\debug\.cargo-lock: You do
not have sufficient access rights to perform this operation.
At line:1 char:1
+ rm \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\targ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (.cargo-lock:FileInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
rm : Directory \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\target\debug cannot be removed because it
is not empty.
At line:1 char:1
+ rm \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\targ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (debug:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : DirectoryNotEmpty,Microsoft.PowerShell.Commands.RemoveItemCommand
rm : Cannot remove item \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\target\.rustc_info.json: You do
not have sufficient access rights to perform this operation.
At line:1 char:1
+ rm \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\targ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (.rustc_info.json:FileInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
rm : Directory \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\target cannot be removed because it is not
empty.
At line:1 char:1
+ rm \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\targ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (\\?\UNC\Mac\wor...generate\target:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : DirectoryNotEmpty,Microsoft.PowerShell.Commands.RemoveItemCommand
But removing a single file from there works:
PS v:\rust\putzen> rm \\?\UNC\Mac\workspaces\rust\cargo-generate-org\cargo-generate\target\.rustc_info.json