<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-dirvish-config-playlist.el, branch load-graph-classify-start</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=load-graph-classify-start</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=load-graph-classify-start'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-05-23T08:31:04+00:00</updated>
<entry>
<title>fix(dirvish): guard nil file and reject path-traversal playlist names</title>
<updated>2026-05-23T08:31:04+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-23T08:31:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=8fc6432d44e41787fb7f69ad792f50cc906393d5'/>
<id>urn:sha1:8fc6432d44e41787fb7f69ad792f50cc906393d5</id>
<content type='text'>
cj/set-wallpaper passed `(dired-file-name-at-point)` straight to `expand-file-name`, so running it with no file at point raised a bare `wrong-type-argument` instead of a clear error. cj/dired-create-playlist-from-marked expanded the raw playlist name under `music-dir` without checking it, so a name like "../foo" or "/etc/foo" would write outside the music directory.

I added a nil-file guard to set-wallpaper and a `cj/--playlist-name-safe-p` check that rejects any name carrying a directory separator before the path is built. Both paths now fail cleanly with a user-error. Regression tests went into the existing wrapper and playlist test files.
</content>
</entry>
<entry>
<title>refactor(dirvish): extract playlist filter and sanitize helpers</title>
<updated>2026-05-10T18:34:24+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-10T18:34:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=3c840b0569ba3461cd61eabc32919f6899a25163'/>
<id>urn:sha1:3c840b0569ba3461cd61eabc32919f6899a25163</id>
<content type='text'>
`cj/dired-create-playlist-from-marked' had its audio-file filtering and trailing-`.m3u' stripping inline among the dired marking, prompting, overwrite-loop, and file-write logic.  Lift each into its own pure helper:

- `cj/--playlist-filter-audio (files extensions)' returns only files whose extension matches one of EXTENSIONS (lowercase, no dot).  Case-insensitive on the file side.
- `cj/--playlist-sanitize-name (name)' strips a trailing `.m3u' suffix; embedded `.m3u' that isn't at the end is preserved.

Ten Normal/Boundary tests cover keep-only-audio, case-insensitivity, files-without-extension excluded, empty inputs, and the sanitize edge cases (bare name, embedded `.m3u', empty string, just `.m3u').
</content>
</entry>
</feed>
