GithubHelp home page GithubHelp logo

sassman / putzen-rs Goto Github PK

View Code? Open in Web Editor NEW
9.0 4.0 1.0 1.2 MB

"putzen" is German and means cleaning. It helps keeping your disk clean of build and dependency artifacts safely.

Home Page: https://crates.io/crates/putzen-cli

License: GNU General Public License v3.0

Shell 0.68% Rust 99.32%
command-line-tool cleaning rust nodejs javascript cmake

putzen-rs's People

Contributors

dependabot[bot] avatar sassman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

putzen-rs's Issues

on windows: `UNC` paths are problematic

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.