Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Oct 27, 2017
Commits on Nov 16, 2017
Showing with 11 additions and 0 deletions.
  1. +11 −0 common/desktop-exports
View
@@ -74,6 +74,17 @@ fi
# Create $XDG_RUNTIME_DIR if not exists (to be removed when LP: #1656340 is fixed)
[ -n "$XDG_RUNTIME_DIR" ] && mkdir -p $XDG_RUNTIME_DIR -m 700
+# Create links for user-dirs.dirs
+REALHOME=`getent passwd $UID | cut -d ':' -f 6`
+test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && . ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
+XDG_SPECIAL_DIRS=($XDG_DOCUMENTS_DIR $XDG_DESKTOP_DIR $XDG_DOWNLOAD_DIR $XDG_MUSIC_DIR $XDG_PICTURES_DIR $XDG_VIDEOS_DIR $XDG_PUBLIC_DIR $XDG_TEMPLATES_DIR)
+for d in ${XDG_SPECIAL_DIRS[@]}; do
+ b=$(basename "$d")
+ if [ -e $REALHOME/$b ] && [ ! -e $SNAP_USER_DATA/$b ]; then
+ ln -s $REALHOME/$b $SNAP_USER_DATA/$b
+ fi
+done
+
# If detect wayland server socket, then set environment so applications prefer
# wayland, and setup compat symlink (until we use user mounts. Remember,
# XDG_RUNTIME_DIR is /run/user/<uid>/snap.$SNAP so look in the parent directory

No commit comments for this range