1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-08 04:04:22 +02:00

Merge pull request #574 from jamiebrynes7/bugfix/apply-patch-windows

Fix applying patch on Windows machines
This commit is contained in:
Dawid Dziurla 2020-01-05 21:46:15 +01:00 committed by GitHub
commit 9e5acb84c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -628,7 +628,7 @@ func (c *GitCommand) Diff(file *File, plain bool, cached bool) string {
func (c *GitCommand) ApplyPatch(patch string, flags ...string) error {
c.Log.Warn(patch)
filepath := filepath.Join(c.Config.GetUserConfigDir(), utils.GetCurrentRepoName(), time.Now().Format(time.StampNano)+".patch")
filepath := filepath.Join(c.Config.GetUserConfigDir(), utils.GetCurrentRepoName(), time.Now().Format("Jan _2 15.04.05.000000000")+".patch")
if err := c.OSCommand.CreateFileWithContent(filepath, patch); err != nil {
return err
}