<constant>SD_PATH_USER_PUBLIC</constant>,
<constant>SD_PATH_USER_TEMPLATES</constant>,
<constant>SD_PATH_USER_DESKTOP</constant>,
+ <constant>SD_PATH_USER_PROJECTS</constant>,
<constant>SD_PATH_SEARCH_BINARIES</constant>,
<constant>SD_PATH_SEARCH_BINARIES_DEFAULT</constant>,
case SD_PATH_USER_DESKTOP:
return from_xdg_user_dir("XDG_DESKTOP_DIR", buffer, ret);
+ case SD_PATH_USER_PROJECTS:
+ return from_xdg_user_dir("XDG_PROJECTS_DIR", buffer, ret);
+
case SD_PATH_SYSTEMD_UTIL:
*ret = PREFIX_NOSLASH "/lib/systemd";
return 0;
[SD_PATH_USER_PUBLIC] = "user-public",
[SD_PATH_USER_TEMPLATES] = "user-templates",
[SD_PATH_USER_DESKTOP] = "user-desktop",
+ [SD_PATH_USER_PROJECTS] = "user-projects",
[SD_PATH_SEARCH_BINARIES] = "search-binaries",
[SD_PATH_SEARCH_BINARIES_DEFAULT] = "search-binaries-default",
SD_PATH_USER_CREDENTIAL_STORE_ENCRYPTED,
SD_PATH_USER_SEARCH_CREDENTIAL_STORE_ENCRYPTED,
+ SD_PATH_USER_PROJECTS,
+
_SD_PATH_MAX,
_SD_PATH_INVALID = UINT64_MAX
};
XDG_MUSIC_DIR="/tmp/vaporwave"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/🤔"
+XDG_PROJECTS_DIR="$HOME/my-projects"
EOF
systemd-path --help
assert_eq "$(systemd-path user-public)" "/root/cat-pictures"
assert_eq "$(systemd-path user-templates)" "/templates"
assert_eq "$(systemd-path user-videos)" "/root/🤔"
+assert_eq "$(systemd-path user-projects)" "/root/my-projects"
# Remove the user-dirs.dir file and check the defaults
rm -fv "$USER_DIRS_CONF"
[[ ! -e "$USER_DIRS_CONF" ]]
assert_eq "$(systemd-path user-desktop)" "/root/Desktop"
-for dir in "" documents download music pictures public templates videos; do
+for dir in "" documents download music pictures public templates videos projects; do
assert_eq "$(systemd-path "user${dir:+-$dir}")" "/root"
done