Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Other] in_trash misses Windows Recycle Bin paths on Linux (Path does not split backslashes)

Open Beginner friendly
#3,501 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
cli

Research direction

Start with in_trash() in strata_control/discovery.py and the failing test tests/terminal/test_issues_022.py::Issue3410TrashIsNotAnInstall::test_trash_folders_are_recognised. Check how Path(path).parts handles backslashes on Linux, then run that test on Linux. Done means the Windows Recycle Bin path is recognized and the test passes.

Written by the indexing model from the issue text.

Description

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).parts treats a backslash as an ordinary character on POSIX, so the whole path arrives as ONE part and $RECYCLE.BIN is never seen. Upstream's own #3410 test fails on Linux for exactly this reason.

Expected: the function's docstring names $RECYCLE.BIN\.. and test_issues_022.py asserts 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):

git checkout v0.2.1.3
python -m pytest "tests/terminal/test_issues_022.py::Issue3410TrashIsNotAnInstall::test_trash_folders_are_recognised" -q
> AssertionError: False is not true : C:\$Recycle.Bin\S-1-5-21\$R123\Strata

or directly: python -c "from strata_control.discovery import in_trash; print(in_trash(r'C:\$Recycle.Bin\S-1-5-21\x\Strata'))" prints False on Linux, True on 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, so test_issues_022.py is 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):

parts = [x.lower() for p in Path(path).parts for x in p.split("\\")]

With exactly this line, tests/terminal/test_issues_022.py passes 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.

Dominant language
C++
Stars
11.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Niko1221/Strata

All issues in Niko1221/Strata

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.