MCPcopy
hub / github.com/micro-editor/micro / backupDir

Method backupDir

internal/buffer/backup.go:83–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81}
82
83func (b *SharedBuffer) backupDir() string {
84 backupdir, err := util.ReplaceHome(b.Settings["backupdir"].(string))
85 if backupdir == "" || err != nil {
86 backupdir = filepath.Join(config.ConfigDir, "backups")
87 }
88 return backupdir
89}
90
91func (b *SharedBuffer) keepBackup() bool {
92 return b.forceKeepBackup || b.Settings["permbackup"].(bool)

Callers 3

writeBackupMethod · 0.95
RemoveBackupMethod · 0.95
ApplyBackupMethod · 0.95

Calls 2

ReplaceHomeFunction · 0.92
JoinMethod · 0.80

Tested by

no test coverage detected