diff options
| author | Shulhan <ms@kilabit.info> | 2023-05-15 23:38:31 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-05-15 23:38:45 +0700 |
| commit | 6fd1ef57498aad5b73808f2b2260ccfe76ae649c (patch) | |
| tree | ea11878727e06e3dc11d878e30da1cdd8fce3c91 | |
| parent | f002873db4dca0631960ae4e770b5747e365bae1 (diff) | |
| download | gotp-6fd1ef57498aad5b73808f2b2260ccfe76ae649c.tar.xz | |
all: check for zero file on config save
If the file is not set, do nothing.
| -rw-r--r-- | config.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -148,6 +148,10 @@ func (cfg *config) get(name string) (issuer *Issuer, err error) { // save the config to file. func (cfg *config) save() (err error) { + if len(cfg.file) == 0 { + return nil + } + var ( logp = `save` |
