mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 12:46:46 +00:00
GODT-2229: Own the full path for gluon and do not change Database path.
This commit is contained in:
committed by
Leander Beernaert
parent
8d9db83a87
commit
0580842ad2
@ -591,7 +591,7 @@ func (s *Service) IsAutomaticUpdateOn(ctx context.Context, _ *emptypb.Empty) (*w
|
||||
func (s *Service) DiskCachePath(ctx context.Context, _ *emptypb.Empty) (*wrapperspb.StringValue, error) {
|
||||
s.log.Debug("DiskCachePath")
|
||||
|
||||
return wrapperspb.String(s.bridge.GetGluonDir()), nil
|
||||
return wrapperspb.String(s.bridge.GetGluonCacheDir()), nil
|
||||
}
|
||||
|
||||
func (s *Service) SetDiskCachePath(ctx context.Context, newPath *wrapperspb.StringValue) (*emptypb.Empty, error) {
|
||||
@ -609,14 +609,14 @@ func (s *Service) SetDiskCachePath(ctx context.Context, newPath *wrapperspb.Stri
|
||||
path = path[1:]
|
||||
}
|
||||
|
||||
if path != s.bridge.GetGluonDir() {
|
||||
if path != s.bridge.GetGluonCacheDir() {
|
||||
if err := s.bridge.SetGluonDir(context.Background(), path); err != nil {
|
||||
s.log.WithError(err).Error("The local cache location could not be changed.")
|
||||
_ = s.SendEvent(NewDiskCacheErrorEvent(DiskCacheErrorType_CANT_MOVE_DISK_CACHE_ERROR))
|
||||
return
|
||||
}
|
||||
|
||||
_ = s.SendEvent(NewDiskCachePathChangedEvent(s.bridge.GetGluonDir()))
|
||||
_ = s.SendEvent(NewDiskCachePathChangedEvent(s.bridge.GetGluonCacheDir()))
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user