aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Rasmussen2017-02-24 15:32:46 +0100
committerGitHub2017-02-24 15:32:46 +0100
commite14e24acf7cf437d73046b49a126ff3787c74269 (patch)
tree9e53427d0ff6510843d5b53efe9d0aa893235de6
parentc7ad97798acefc2f801393d5bf59876386954f46 (diff)
parent2aa4234efa6e04fdeee3129acdaa3464aa170dcd (diff)
downloadgdrive-e14e24acf7cf437d73046b49a126ff3787c74269.tar.bz2
Merge pull request #258 from saaros/dont-read-nonexistent-tokens
auth/file_source: don't try to read non-existent files
-rw-r--r--auth/file_source.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/auth/file_source.go b/auth/file_source.go
index 11e7325..9223d1d 100644
--- a/auth/file_source.go
+++ b/auth/file_source.go
@@ -47,7 +47,7 @@ func ReadFile(path string) ([]byte, bool, error) {
func ReadToken(path string) (*oauth2.Token, bool, error) {
content, exists, err := ReadFile(path)
- if err != nil {
+ if err != nil || exists == false {
return nil, exists, err
}