From 96bcfc8adc2e885b45c3ea17526ac0ca4fd20080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 11 Oct 2023 04:49:05 +0200 Subject: [PATCH] Track API changes. --- src/ui/main_window.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/main_window.rs b/src/ui/main_window.rs index cc6c3ae..bd5abe0 100644 --- a/src/ui/main_window.rs +++ b/src/ui/main_window.rs @@ -565,15 +565,15 @@ impl<'a> eframe::App for MainWindow<'a> { if self.open_file_window.show_file_chooser(ctx) { let file = self.open_file_window.opened_file.take(); if let Some(file) = &file { - if file.path.exists() { - self.open_file(&file.path, false); + if file.file_info.path.exists() { + self.open_file(&file.file_info.path, false); } else if let Some(data) = &file.file_data { - let mut path = file.path.clone(); + let mut path = file.file_info.path.clone(); if let Some(user) = UserDirs::new() { if let Some(dir) = user.document_dir() { path = dir.join(path); while path.exists() { - path = path.with_extension(format!("1.{}", file.path.extension().unwrap().to_string_lossy())); + path = path.with_extension(format!("1.{}", file.file_info.path.extension().unwrap().to_string_lossy())); } } }