Compare commits

5 Commits

Author SHA1 Message Date
8b1d9a81a1 minor change to core.py 2025-11-09 10:34:46 +00:00
6eb3f5a210 Minor fix to inline documentation 2025-11-09 10:25:33 +00:00
Marco D'Aleo
9a64bef661 chore: trigger release
docs: remove end-of-the-file line in CONTRIBUTING.md
2025-11-09 10:10:44 +00:00
5b46a3af01 docs: remove end-of-the-file line in CONTRIBUTING.md 2025-11-09 10:09:07 +00:00
Marco D'Aleo
c8cc694e3c Merge pull request #1 from mdaleo404/restore_many
Add support for restoring multiple files, minor changes to READMEs
2025-11-09 09:54:36 +00:00
2 changed files with 4 additions and 4 deletions

View File

@@ -92,4 +92,4 @@ If you're unsure about anything:
## Thank You
Your contributions — large or small — help make `resrm` better for everyone. Thanks for being part of the project!
Your contributions — large or small — help make `resrm` better for everyone. Thanks for being part of the project!

View File

@@ -244,7 +244,7 @@ def move_to_trash(path: Path, interactive: bool, force: bool, recursive: bool, p
print(f"Failed permanent delete: {e}")
return
# 🚫 Prevent non-root user deleting root-owned files
# Prevent non-root user deleting root-owned files
try:
st = path.stat()
if st.st_uid == 0 and os.geteuid() != 0:
@@ -253,7 +253,7 @@ def move_to_trash(path: Path, interactive: bool, force: bool, recursive: bool, p
except Exception:
pass
# 🧭 Detect which trash to use (based on file owner)
# Detect which trash to use (based on file owner)
try:
import pwd
owner_uid = path.stat().st_uid
@@ -344,4 +344,4 @@ def main(argv: Optional[List[str]] = None):
continue
print(f"resrm: cannot remove '{pth}': Is a directory")
continue
move_to_trash(pth, interactive=args.i, force=args.f, recursive=args.r, perma=args.perma)
move_to_trash(pth, interactive=args.i, force=args.f, recursive=args.r, perma=args.perma)