diff options
| author | Petter Rasmussen | 2017-02-24 15:32:46 +0100 |
|---|---|---|
| committer | GitHub | 2017-02-24 15:32:46 +0100 |
| commit | e14e24acf7cf437d73046b49a126ff3787c74269 (patch) | |
| tree | 9e53427d0ff6510843d5b53efe9d0aa893235de6 /auth | |
| parent | c7ad97798acefc2f801393d5bf59876386954f46 (diff) | |
| parent | 2aa4234efa6e04fdeee3129acdaa3464aa170dcd (diff) | |
| download | gdrive-e14e24acf7cf437d73046b49a126ff3787c74269.tar.bz2 | |
Merge pull request #258 from saaros/dont-read-nonexistent-tokens
auth/file_source: don't try to read non-existent files
Diffstat (limited to 'auth')
| -rw-r--r-- | auth/file_source.go | 2 |
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 } |
