From 2ea8dc00ed001d045792e974b46264d920090606 Mon Sep 17 00:00:00 2001 From: Hunter Wittenborn Date: Sat, 18 Nov 2023 19:23:26 -0600 Subject: [PATCH] Fix Google Drive authentication window not showing when using older rclone versions --- CHANGELOG.md | 7 +++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- .../com.hunterwittenborn.Celeste.metainfo.xml | 20 +++++++++++++++++++ makedeb/PKGBUILD | 2 +- po/com.hunterwittenborn.Celeste.pot | 20 +++++++++---------- src/login/gdrive.rs | 12 ++++++++--- 7 files changed, 49 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bccfc5a..e765172 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.8.1] - 2023-11-18 +### Changed +- Added more keywords to Celeste's desktop entry. + +### Fixed +- Fixed Google Drive authentication window not showing when using older rclone versions. + ## [0.8.0] - 2023-10-23 ### Changed - Added functionality to only run sync checks when files are changed. diff --git a/Cargo.lock b/Cargo.lock index bd0c3ee..0b61f9e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -602,7 +602,7 @@ dependencies = [ [[package]] name = "celeste" -version = "0.8.0" +version = "0.8.1" dependencies = [ "base64 0.20.0", "blocking", diff --git a/Cargo.toml b/Cargo.toml index 8daab5a..58e354c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "celeste" -version = "0.8.0" +version = "0.8.1" edition = "2021" [dependencies] diff --git a/assets/com.hunterwittenborn.Celeste.metainfo.xml b/assets/com.hunterwittenborn.Celeste.metainfo.xml index a6a0e5a..ce35d08 100644 --- a/assets/com.hunterwittenborn.Celeste.metainfo.xml +++ b/assets/com.hunterwittenborn.Celeste.metainfo.xml @@ -41,6 +41,26 @@ + + +

+ Changes in this release: +

+
    +
  • + Added more keywords to Celeste's desktop entry. +
  • +
+

+ Fixes in this release: +

+
    +
  • + Fixed Google Drive authentication window not showing when using older rclone versions. +
  • +
+
+

diff --git a/makedeb/PKGBUILD b/makedeb/PKGBUILD index 1fdda10..761c1d2 100644 --- a/makedeb/PKGBUILD +++ b/makedeb/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Hunter Wittenborn pkgname=celeste -pkgver=0.8.0 +pkgver=0.8.1 pkgrel=1 pkgdesc='Sync your cloud files' arch=('any') diff --git a/po/com.hunterwittenborn.Celeste.pot b/po/com.hunterwittenborn.Celeste.pot index 8df07f1..25ebf30 100644 --- a/po/com.hunterwittenborn.Celeste.pot +++ b/po/com.hunterwittenborn.Celeste.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Celeste 0.8.0\n" +"Project-Id-Version: Celeste 0.8.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-23 20:35+0000\n" +"POT-Creation-Date: 2023-11-19 01:22+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -78,7 +78,7 @@ msgstr "" msgid "Local folder:" msgstr "" -#: src/launch.rs:613 src/launch.rs:775 src/login/gdrive.rs:208 +#: src/launch.rs:613 src/launch.rs:775 src/login/gdrive.rs:214 msgid "Cancel" msgstr "" @@ -213,32 +213,32 @@ msgstr "" msgid "Finished sync checks." msgstr "" -#: src/login/gdrive.rs:205 +#: src/login/gdrive.rs:211 msgid "Authenticating to {}..." msgstr "" -#: src/login/gdrive.rs:206 +#: src/login/gdrive.rs:212 msgid "Follow the link that opened in your browser, and come back once you've finished." msgstr "" -#: src/login/gdrive.rs:233 +#: src/login/gdrive.rs:239 msgid "There was an issue while running the webserver for authentication" msgstr "" -#: src/login/gdrive.rs:242 +#: src/login/gdrive.rs:248 msgid "There was an issue authenticating to {}" msgstr "" #: src/login/login_util.rs:15 -msgid "Server Name" +msgid "Name" msgstr "" #: src/login/login_util.rs:27 -msgid "Server name already exists." +msgid "Name already exists." msgstr "" #: src/login/login_util.rs:29 -msgid "Invalid server name. Server names must:\n" +msgid "Invalid name. Names must:\n" "- Only contain numbers, letters, '_', '-', '.', and spaces\n" "- Not start with '-' or a space\n" "- Not end with a space" diff --git a/src/login/gdrive.rs b/src/login/gdrive.rs index bf9ef21..b2b28b9 100644 --- a/src/login/gdrive.rs +++ b/src/login/gdrive.rs @@ -176,7 +176,15 @@ impl GDriveConfig { } // Otherwise check if the URL line has been printed, by checking for the auth URL. - if let Some(line) = process_stderr.lock().unwrap().lines().find(|line| line.contains("http://127.0.0.1:53682/auth")) { + // + // We check on both stdout and stderr, as rclone seems to report the authentication + // URL differently depending on the version we're using. + let process_output = format!( + "{}\n{}", + process_stdout.lock().unwrap(), + process_stderr.lock().unwrap(), + ); + if let Some(line) = process_output.lines().find(|line| line.contains("http://127.0.0.1:53682/auth")) { // The URL will be the last space-separated item on the line. *STATE_URL.lock().unwrap() = line.split_whitespace().last().unwrap().to_owned(); break @@ -186,8 +194,6 @@ impl GDriveConfig { } hw_msg::warningln!("STATE URL: {}", STATE_URL.lock().unwrap()); - hw_msg::warningln!("DEBUGGING: {}", process_stderr.lock().unwrap()); - let kill_request = Rc::new(RefCell::new(false)); // Set up and open the temporary HTTP server.