Skip to content

Commit

Permalink
Fix Google Drive authentication window not showing when using older r…
Browse files Browse the repository at this point in the history
…clone versions
  • Loading branch information
hwittenborn committed Nov 19, 2023
1 parent 4c4c9bd commit 2ea8dc0
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 16 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "celeste"
version = "0.8.0"
version = "0.8.1"
edition = "2021"

[dependencies]
Expand Down
20 changes: 20 additions & 0 deletions assets/com.hunterwittenborn.Celeste.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,26 @@
</screenshot>
</screenshots>
<releases>
<release date="2023-11-18" version="0.8.1">
<description>
<p>
Changes in this release:
</p>
<ul>
<li>
Added more keywords to Celeste's desktop entry.
</li>
</ul>
<p>
Fixes in this release:
</p>
<ul>
<li>
Fixed Google Drive authentication window not showing when using older rclone versions.
</li>
</ul>
</description>
</release>
<release date="2023-10-23" version="0.8.0">
<description>
<p>
Expand Down
2 changes: 1 addition & 1 deletion makedeb/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: Hunter Wittenborn <[email protected]>
pkgname=celeste
pkgver=0.8.0
pkgver=0.8.1
pkgrel=1
pkgdesc='Sync your cloud files'
arch=('any')
Expand Down
20 changes: 10 additions & 10 deletions po/com.hunterwittenborn.Celeste.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -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 ""

Expand Down Expand Up @@ -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"
Expand Down
12 changes: 9 additions & 3 deletions src/login/gdrive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit 2ea8dc0

Please sign in to comment.