forked from Silverfish/proton-bridge
feat(GODT-2829): Integrate new sync service
Update imap service to use the new sync service. The new sync state is stored as simple file on disk to avoid contention with concurrent vault writes.
This commit is contained in:
@ -198,6 +198,14 @@ func (l *Locations) ProvideStatsPath() (string, error) {
|
||||
return l.getStatsPath(), nil
|
||||
}
|
||||
|
||||
func (l *Locations) ProvideIMAPSyncConfigPath() (string, error) {
|
||||
if err := os.MkdirAll(l.getIMAPSyncConfigPath(), 0o700); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return l.getIMAPSyncConfigPath(), nil
|
||||
}
|
||||
|
||||
func (l *Locations) getGluonCachePath() string {
|
||||
return filepath.Join(l.userData, "gluon")
|
||||
}
|
||||
@ -214,6 +222,10 @@ func (l *Locations) getSettingsPath() string {
|
||||
return l.userConfig
|
||||
}
|
||||
|
||||
func (l *Locations) getIMAPSyncConfigPath() string {
|
||||
return filepath.Join(l.userConfig, "imap-sync")
|
||||
}
|
||||
|
||||
func (l *Locations) getLogsPath() string {
|
||||
return filepath.Join(l.userData, "logs")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user