crash.log written into repo root on Linux (breaks Syncthing casing sync)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start in plotruler/main.py at _crash_log_path() and inspect how the fallback behaves when LOCALAPPDATA and TEMP are unset on Linux. Choose and implement a platform-appropriate location that cannot create a capitalized PlotRuler directory in the repository, then verify that crash.log is written outside the working tree; consider the related .gitignore suggestion.
Written by the indexing model from the issue text.
Description
Summary
When run on Linux with LOCALAPPDATA/TEMP unset, _crash_log_path() falls back to ".", so the crash log is written to ./PlotRuler/crash.log inside the repository working tree.
Code
plotruler/__main__.py:
def _crash_log_path():
base = os.environ.get("LOCALAPPDATA") or os.environ.get("TEMP") or "."
return os.path.join(base, "PlotRuler", "crash.log")
- Windows:
LOCALAPPDATAis set →%LOCALAPPDATA%\PlotRuler\crash.log(fine). - Linux/macOS: neither var is set → logs to
./PlotRuler/crash.log.
Problem
The repo root already contains the lowercase package plotruler/. On case-insensitive filesystems (Windows/macOS) the two collide, and tools that sync the tree — e.g. Syncthing — report a casing conflict:
remote "Programming\GraphRuler\PlotRuler" uses different upper or lowercase characters than local "Programming\GraphRuler\plotruler"
so the items never sync until the stray PlotRuler/ dir is deleted manually.
Suggestion
Use a platform-appropriate XDG path on non-Windows, e.g.:
base = os.environ.get("LOCALAPPDATA") or os.environ.get("XDG_STATE_HOME", os.path.expanduser("~/.local/state"))
and/or log with the app name directly rather than a capital-cased dir that can shadow the lowercase package. Also consider ignoring the runtime dir in .gitignore as a belt-and-suspenders measure.
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from endolith/plotruler
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
All issues in endolith/plotruler
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100