Skip to content

Commit

Permalink
Merge pull request #906 from gotd/feat/tdesktop-make-config-optional
Browse files Browse the repository at this point in the history
chore: ignore more errors
  • Loading branch information
ernado authored Oct 21, 2022
2 parents b3d161a + b8b3644 commit 3bd80e1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions session/tdesktop/tdesktop.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ func ReadFS(root fs.FS, passcode []byte) ([]Account, error) {
Authorization: mtpData,
}
mtpConfigFile, err := open(root, path.Join(keyFile, "config"))
if err != nil {
return nil, errors.Wrap(err, "open mtp config")
}
mtpConfig, err := readMTPConfig(mtpConfigFile, kd.localKey)
// HACK: ignoring error, because config is optional.
if err == nil {
a.Config = mtpConfig
mtpConfig, err := readMTPConfig(mtpConfigFile, kd.localKey)
// HACK: ignoring error, because config is optional.
if err == nil {
a.Config = mtpConfig
}
}

r = append(r, a)
}

Expand Down

0 comments on commit 3bd80e1

Please sign in to comment.