|
_expand_command now parses the command template with g_shell_parse_argv
FIRST, then substitutes %f into the already-parsed argv elements, so %f is
always exactly one argv value regardless of spaces or shell metacharacters
in the path. Previously it split on literal spaces, breaking quoted commands
like sh -c '...' and mis-splitting paths with spaces.
opener_launch propagates parse errors (returns FALSE, sets GError) instead
of launching malformed argv. A non-local GFile (no path) is now rejected
with G_IO_ERROR_NOT_SUPPORTED rather than producing an argv with an
embedded NULL.
Tests: quoted, quoted-with-%f, escaped spaces, option flags, weird
filename (quoted + unquoted), malformed (unclosed quote), empty command,
direct argv-shape regression (one argv value), and no-local-path rejection.
|
|
M8 (partial): plain-C operate modules + unit tests.
- src/mover.{c,h}: move files to configured dests (g_file_move + stem
collision suffix -1/-2), one-level undo (move back), acts on marks-or-current.
- src/opener.{c,h}: %f expand + detached GSubprocess launch (non-blocking).
- src/runner.{c,h}: /bin/sh -c with single-quoted %f/%d (injection guard),
async wait_check, rescan on completion.
- src/clipboard.{c,h}: image/png via GdkContentProvider + uri-list.
- meson: new sources added to libggae.
- tests: unit test_mover (move/undo/collision), test_opener (true/false/weird
filenames), test_runner (true/false/injection guard). 19/19 green, ASan clean.
- Fixed: g_str_replace (not in GLib 2.88) → manual _str_replace; GdkContentProvider
API (new_typed/new_for_value); mover collision stem-suffix; runner /bin/sh -c
argv (single arg, not shell-parsed); test GFile leaks.
|