mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Make storedir consistent with mix of flags etc
This commit is contained in:
committed by
Ivan Kozlovic
parent
ea5cddd590
commit
0c74a850b5
@@ -154,8 +154,10 @@ func (s *Server) EnableJetStream(config *JetStreamConfig) error {
|
||||
config.Domain = domain
|
||||
}
|
||||
s.Debugf("JetStream creating dynamic configuration - %s memory, %s disk", friendlyBytes(config.MaxMemory), friendlyBytes(config.MaxStore))
|
||||
} else if config != nil && config.StoreDir != _EMPTY_ {
|
||||
config.StoreDir = filepath.Join(config.StoreDir, JetStreamStoreDir)
|
||||
}
|
||||
// Copy, don't change callers version.
|
||||
|
||||
cfg := *config
|
||||
if cfg.StoreDir == _EMPTY_ {
|
||||
cfg.StoreDir = filepath.Join(os.TempDir(), JetStreamStoreDir)
|
||||
|
||||
Reference in New Issue
Block a user