mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-25 18:07:07 +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
|
newPath := b.Path != filename
|
||||||
|
if newPath {
|
||||||
|
b.RemoveBackup()
|
||||||
|
}
|
||||||
|
|
||||||
b.Path = filename
|
b.Path = filename
|
||||||
b.AbsPath = absFilename
|
b.AbsPath = absFilename
|
||||||
b.isModified = false
|
b.isModified = false
|
||||||
|
|||||||
Reference in New Issue
Block a user