mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-26 08:50:22 +09:00
Ignore the backup option when removing backup
When we need to remove existing backup for whatever reason (e.g. because we've just successfully saved the file), we should do that regardless of whether backups are enabled or not, since a backup may exist regardless (it could have been created before the `backup` option got disabled).
This commit is contained in:
@@ -126,7 +126,7 @@ func (b *SharedBuffer) Backup() error {
|
||||
|
||||
// RemoveBackup removes any backup file associated with this buffer
|
||||
func (b *SharedBuffer) RemoveBackup() {
|
||||
if !b.Settings["backup"].(bool) || b.keepBackup() || b.Path == "" || b.Type != BTDefault {
|
||||
if b.keepBackup() || b.Path == "" || b.Type != BTDefault {
|
||||
return
|
||||
}
|
||||
f := util.DetermineEscapePath(b.backupDir(), b.AbsPath)
|
||||
|
||||
Reference in New Issue
Block a user