~goorzhel/radm

aeb5136450c23e9d012e6501fdf4016e4c009782 — Antonio Gurgel 3 months ago 8f41fd3
Update documentation on XDG_RUNTIME_DIR

I had long forgotten that function doesn't futz with
$XDG_RUNTIME_DIR anymore.
2 files changed, 4 insertions(+), 3 deletions(-)

M src/system.rs
M src/user.rs
M src/system.rs => src/system.rs +2 -2
@@ 31,8 31,8 @@ pub fn drop_privileges(user: &User) -> Result<()> {
    Ok(())
}

/// Reads environment variable `$XDG_RUNTIME_DIR` (or sets it to `/run/user/$UID`) and
/// ensures a directory with the correct perms exists at the path.
/// Reads environment variable `$XDG_RUNTIME_DIR` and ensures a directory with
/// the correct perms exists at the path.
///
/// Requires root.
pub fn prepare_xdg_runtime(user: &User) -> Result<()> {

M src/user.rs => src/user.rs +2 -1
@@ 56,7 56,8 @@ impl User {
    /// Loads the user's environment by executing `env` through a login shell.
    ///
    /// The [return value](xdg::BaseDirectories) is useful for later functions to determine
    /// runtime, state, and cache storage.
    /// runtime, state, and cache storage. Accordingly, the env var `$XDG_RUNTIME_DIR`
    /// will default to `/run/user/$UID` if unset.
    ///
    /// Known to work with: bash, dash, and zsh.
    pub fn load_environment(&self) -> Result<BaseDirectories> {