Cleanup: use oscommands.RemoveFile rather than plain os.Remove

This makes it mockable for tests, and is consistent with other uses in this
file.
This commit is contained in:
Stefan Haller 2026-03-22 15:36:25 +01:00
parent d241ec4ee1
commit 706a6c0474

View file

@ -219,8 +219,7 @@ func (self *WorkingTreeCommands) RemoveUntrackedDirFiles(node IFileNode) error {
)
for _, path := range untrackedFilePaths {
err := os.Remove(path)
if err != nil {
if err := self.os.RemoveFile(path); err != nil {
return err
}
}