Skip to content

Keep dev in sync with main - #3085

Merged
ivan-hc merged 2 commits into
devfrom
main
Nov 27, 2026
Merged

ivan-hc merged 2 commits into
devfrom
main

Conversation

@ivan-hc

@ivan-hc ivan-hc commented Nov 27, 2026

Copy link
Copy Markdown
Owner

No description provided.

sagarrsharmaa and others added 2 commits November 27, 2026 16:02
The loop that looks up the XDG user dirs for "--sandbox" runs
eval XDG_DIR="$(xdg-user-dir $DIR)", so the path is parsed again as
shell code. If a dir has a space in its name, the word after the space
is run as a command and XDG_DIR keeps whatever it held before:

- With the pt_BR default Desktop, "Área de trabalho" (Russian
  "Рабочий стол" and Greek have a space too), it prints
  "de: not found" and DESKTOP falls back to ~/Desktop, which doesn't
  exist. Allowing the app to access the Desktop gives it
  --add-file ~/Desktop:rw instead of the real folder.
- A dir later in the loop gets the previous dir's path. With
  XDG_PICTURES_DIR="$HOME/My Pictures", PICTURES becomes ~/Music, so
  the prompts ask about ~/Music twice and allowing Pictures gives the
  app read-write access to ~/Music.

The same loop is in the launcher script that replaces the AppImage, so
the error is printed every time the sandboxed app starts. The second
line, eval $DIR="$XDG_DIR", would split the path the same way once
the first one is fixed.

xdg-user-dir already prints the full path, so a plain command
substitution is enough, and eval "$DIR=\$XDG_DIR" (as 7d957c4 did for
_read) assigns the value without parsing it again. Both work in POSIX
sh.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants