From b2e626091f9d5cc91a67cf382150bd26d32a53a8 Mon Sep 17 00:00:00 2001 From: Sophie Herold Date: Fri, 31 Jan 2025 20:09:21 +0100 Subject: [PATCH] edit_window: Fix new filename detection --- src/widgets/edit_window.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/widgets/edit_window.rs b/src/widgets/edit_window.rs index 9fcbebc..866a68a 100644 --- a/src/widgets/edit_window.rs +++ b/src/widgets/edit_window.rs @@ -203,16 +203,14 @@ mod imp { new_path.set_file_name(new_filename); let file = gio::File::for_path(&new_path); - let file_exists = gio::CancellableFuture::new( - file.query_info_future( + let file_exists = file + .query_info_future( gio::FILE_ATTRIBUTE_STANDARD_NAME, gio::FileQueryInfoFlags::NONE, glib::Priority::DEFAULT, - ), - cancellable.clone(), - ) - .await - .is_ok(); + ) + .await + .is_ok(); if !file_exists { suggested_file = Some(file);