1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

Fix staging/unstaging files containing " in paths

This commit is contained in:
Ryooooooga
2021-03-02 12:15:25 +09:00
committed by Jesse Duffield
parent e5ba0d9d9c
commit 64daf1310d
3 changed files with 1 additions and 18 deletions

View File

@ -256,12 +256,6 @@ func (c *OSCommand) Quote(message string) string {
return escapedQuote + message + escapedQuote
}
// Unquote removes wrapping quotations marks if they are present
// this is needed for removing quotes from staged filenames with spaces
func (c *OSCommand) Unquote(message string) string {
return strings.Replace(message, `"`, "", -1)
}
// AppendLineToFile adds a new line in file
func (c *OSCommand) AppendLineToFile(filename, line string) error {
f, err := os.OpenFile(filename, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600)