mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
Use filepath instead of path for file path operations
In practice, using path seems to work too, since Windows seems to be capable of dealing with a path like C:/x/y instead of C:\x\y; but it's cleaner to do this properly.
This commit is contained in:
parent
07dd8a2b07
commit
75a95865ff
3 changed files with 78 additions and 25 deletions
|
@ -3,7 +3,7 @@ package git_commands
|
|||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/go-errors/errors"
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||
|
@ -233,7 +233,7 @@ func (self *WorkingTreeCommands) Ignore(filename string) error {
|
|||
|
||||
// Exclude adds a file to the .git/info/exclude for the repo
|
||||
func (self *WorkingTreeCommands) Exclude(filename string) error {
|
||||
excludeFile := path.Join(self.repoPaths.repoGitDirPath, "info", "exclude")
|
||||
excludeFile := filepath.Join(self.repoPaths.repoGitDirPath, "info", "exclude")
|
||||
return self.os.AppendLineToFile(excludeFile, filename)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue