Skip to content

Commit

Permalink
fix reload token bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yuudi committed Jul 21, 2023
1 parent 16e3027 commit 9532cd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onesend.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func entry() error {

// read token
savedRefreshToken, err := os.ReadFile("token.txt")
if err != nil && len(savedRefreshToken) != 0 {
if err == nil && len(savedRefreshToken) != 0 {
// saved token available
client, err = setupOAuthClient(string(savedRefreshToken), clientID, clientSecret, authURL, tokenURL)
if err != nil {
Expand Down

0 comments on commit 9532cd5

Please sign in to comment.