aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/config/mod.rs
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2020-01-12 01:24:56 +0100
committerGitHub <noreply@github.com>2020-01-12 01:24:56 +0100
commit09ed64bd365bdb294a29e2e6b0149b0581a1fa81 (patch)
treea6c8ba50b47b806f1bc82847198d070d66633984 /alacritty_terminal/src/config/mod.rs
parenta82df6ac4309f16bd1c75d13f1f4f1b9f79582eb (diff)
downloadalacritty-09ed64bd365bdb294a29e2e6b0149b0581a1fa81.tar.gz
alacritty-09ed64bd365bdb294a29e2e6b0149b0581a1fa81.zip
Fix crash with invalid working directory
Diffstat (limited to 'alacritty_terminal/src/config/mod.rs')
-rw-r--r--alacritty_terminal/src/config/mod.rs14
1 files changed, 2 insertions, 12 deletions
diff --git a/alacritty_terminal/src/config/mod.rs b/alacritty_terminal/src/config/mod.rs
index f3257b7b..d077190b 100644
--- a/alacritty_terminal/src/config/mod.rs
+++ b/alacritty_terminal/src/config/mod.rs
@@ -15,7 +15,7 @@
use std::borrow::Cow;
use std::collections::HashMap;
use std::fmt::Display;
-use std::path::{Path, PathBuf};
+use std::path::PathBuf;
use log::error;
use serde::{Deserialize, Deserializer};
@@ -119,7 +119,7 @@ pub struct Config<T> {
/// Shell startup directory
#[serde(default, deserialize_with = "option_explicit_none")]
- working_directory: Option<PathBuf>,
+ pub working_directory: Option<PathBuf>,
/// Debug options
#[serde(default, deserialize_with = "failure_default")]
@@ -207,16 +207,6 @@ impl<T> Config<T> {
pub fn background_opacity(&self) -> f32 {
self.background_opacity.0
}
-
- #[inline]
- pub fn working_directory(&self) -> Option<&Path> {
- self.working_directory.as_ref().map(|path_buf| path_buf.as_path())
- }
-
- #[inline]
- pub fn set_working_directory(&mut self, working_directory: Option<PathBuf>) {
- self.working_directory = working_directory;
- }
}
#[serde(default)]