From 663c036ca5c5639c772a3f37ccef50ff03979337 Mon Sep 17 00:00:00 2001 From: Ryooooooga Date: Mon, 27 Sep 2021 22:39:20 +0900 Subject: Save patch files in TempDir --- pkg/commands/files.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/commands') diff --git a/pkg/commands/files.go b/pkg/commands/files.go index 5ad6eeb66..74beb9fb7 100644 --- a/pkg/commands/files.go +++ b/pkg/commands/files.go @@ -224,7 +224,7 @@ func (c *GitCommand) WorktreeFileDiffCmdStr(node models.IFile, plain bool, cache } func (c *GitCommand) ApplyPatch(patch string, flags ...string) error { - filepath := filepath.Join(c.Config.GetUserConfigDir(), utils.GetCurrentRepoName(), time.Now().Format("Jan _2 15.04.05.000000000")+".patch") + filepath := filepath.Join(c.Config.GetTempDir(), utils.GetCurrentRepoName(), time.Now().Format("Jan _2 15.04.05.000000000")+".patch") c.Log.Infof("saving temporary patch to %s", filepath) if err := c.OSCommand.CreateFileWithContent(filepath, patch); err != nil { return err -- cgit v1.2.3