GODT-2251: Store gluon cache in user cache rather than user data

This commit is contained in:
James Houlahan
2023-01-16 16:27:41 +01:00
parent fdbc380421
commit 03c8c323bc
10 changed files with 53 additions and 31 deletions

View File

@ -47,7 +47,7 @@ type Vault struct {
}
// New constructs a new encrypted data vault at the given filepath using the given encryption key.
func New(vaultDir, gluonDir string, key []byte) (*Vault, bool, error) {
func New(vaultDir, gluonCacheDir string, key []byte) (*Vault, bool, error) {
if err := os.MkdirAll(vaultDir, 0o700); err != nil {
return nil, false, err
}
@ -64,7 +64,7 @@ func New(vaultDir, gluonDir string, key []byte) (*Vault, bool, error) {
return nil, false, err
}
vault, corrupt, err := newVault(filepath.Join(vaultDir, "vault.enc"), gluonDir, gcm)
vault, corrupt, err := newVault(filepath.Join(vaultDir, "vault.enc"), gluonCacheDir, gcm)
if err != nil {
return nil, false, err
}