diff options
| author | pml68 <contact@pml68.dev> | 2025-07-01 22:54:31 +0200 |
|---|---|---|
| committer | pml68 <contact@pml68.dev> | 2025-07-01 22:55:16 +0200 |
| commit | 1e6963304f1efdbc15b880a650346c631d15e99b (patch) | |
| tree | fbf2a83fb8e5e9e53343dc745809aae08e8c76f0 /src/main.rs | |
| parent | chore(PKGBUILD): remove clang and mold from `makedepends` [skip ci] (diff) | |
| download | iced-builder-1e6963304f1efdbc15b880a650346c631d15e99b.tar.gz | |
fix: relative project path written to config, bump MSRV to 1.88.0
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/main.rs b/src/main.rs index 545f176..389c827 100644 --- a/src/main.rs +++ b/src/main.rs @@ -101,13 +101,14 @@ impl IcedBuilder { let mut tasks = vec![Task::perform(Config::load(), Message::ConfigLoad)]; - if let Some(path) = project_path.as_deref() { - if path.exists() && path.is_file() { - tasks.push(Task::perform( - Project::from_path(path.to_path_buf()), - Message::FileOpened, - )); - } + if let Some(path) = project_path.as_deref() + && path.exists() + && path.is_file() + { + tasks.push(Task::perform( + Project::from_path(path.to_path_buf()), + Message::FileOpened, + )); } ( @@ -159,10 +160,8 @@ impl IcedBuilder { self.config = config; self.theme.settle_at(self.config.selected_theme()); - if let Some(path) = self - .config - .last_project() - .filter(|_| self.project_path.is_none()) + if let Some(path) = self.config.last_project() + && self.project_path.is_none() { if path.exists() && path.is_file() { return Task::perform( @@ -378,7 +377,8 @@ impl IcedBuilder { match result { Ok((path, project)) => { self.project = project; - self.project_path = Some(path); + self.project_path = + Some(path.canonicalize().unwrap_or(path)); return Task::done( ConfigChangeType::LastProject.into(), |
