mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3501] [Other] in_trash misses Windows Recycle Bin paths on Linux (Path does not split backslashes) #1434
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1434
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TheHubUser4860938 on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3501
Problem: the
in_trash()helper added for #3410 (strata_control/discovery.py) never matches a Windows Recycle Bin path when it runs on Linux:Path(path).partstreats a backslash as an ordinary character on POSIX, so the whole path arrives as ONE part and$RECYCLE.BINis never seen. Upstream's own #3410 test fails on Linux for exactly this reason.Expected: the function's docstring names
$RECYCLE.BIN\..andtest_issues_022.pyasserts a Windows Recycle Bin path on every OS the suite runs on; both should hold on Linux.Actual (reproduced locally, clean
v0.2.1.3, Linux, Python 3.14):or directly:
python -c "from strata_control.discovery import in_trash; print(in_trash(r'C:\$Recycle.Bin\S-1-5-21\x\Strata'))"printsFalseon Linux,Trueon Windows.Scope of the user-visible effect, stated honestly: on Linux, paths read live from a mounted NTFS drive arrive POSIX-style (
/mnt/d/$RECYCLE.BIN/...) and DO match today; the gap is Windows-shaped path strings on Linux - the case the docstring and the test name (and a Linux install reading a settings file written by its Windows twin would produce).CI note: the repository's workflows run only
tests/terminal/test_runtime.py(terminal-minimal-server) plus the monitor jobs, sotest_issues_022.pyis not exercised on Linux in CI - which is why this shipped.Suggested fix (one line; a no-op on Windows, where Path already split the backslashes):
With exactly this line,
tests/terminal/test_issues_022.pypasses in full on Linux (26 passed). Our fork merge carried the fix already; posting so upstream can take it.Reproduction status: reproduced locally (test failure on the clean tag).
Environment: v0.2.1.3 (
cbfd5b92), Linux, Python 3.14; no GPU involved - Terminal/discovery code only.@Niko1221 commented on GitHub (Oct 21, 2026):
Fixed for 0.2.2, the next release (not out yet). Thanks, taken as you wrote it with your authorship kept, plus a test that runs on any OS.