Compare commits
11 Commits
restore_ma
...
gitignore_
| Author | SHA1 | Date | |
|---|---|---|---|
| 4fd1243472 | |||
|
|
328eeaca7a | ||
| 19b79b26ff | |||
|
|
a67e31c65d | ||
| 9d4608bd34 | |||
|
|
27468ae0d0 | ||
| 8b1d9a81a1 | |||
| 6eb3f5a210 | |||
|
|
9a64bef661 | ||
| 5b46a3af01 | |||
|
|
c8cc694e3c |
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@@ -3,7 +3,7 @@ name: Publish to PyPI
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
build-publish:
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,3 @@
|
||||
__pycache__
|
||||
.pytest_cache
|
||||
dist
|
||||
dist
|
||||
@@ -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!
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"release-type": "python",
|
||||
"package-name": "resrm",
|
||||
"include-v-in-tag": true,
|
||||
"changelog-sections": [
|
||||
{ "type": "feat", "section": "Added", "hidden": false },
|
||||
{ "type": "fix", "section": "Fixed", "hidden": false },
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user