mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-04 22:20:20 +09:00
save: Remove a possible written backup in case the path has changed
This commit is contained in:
@@ -331,6 +331,10 @@ func (b *Buffer) saveToFile(filename string, withSudo bool, autoSave bool) error
|
||||
}
|
||||
|
||||
newPath := b.Path != filename
|
||||
if newPath {
|
||||
b.RemoveBackup()
|
||||
}
|
||||
|
||||
b.Path = filename
|
||||
b.AbsPath = absFilename
|
||||
b.isModified = false
|
||||
|
||||
Reference in New Issue
Block a user