mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 02:01:43 +03:00
repo: close before deleting
This commit is contained in:
parent
52ef5e96f5
commit
8128bb79b0
@ -488,6 +488,11 @@ func (repo *GitRepo) GetLocalRemote() string {
|
||||
|
||||
// EraseFromDisk delete this repository entirely from the disk
|
||||
func (repo *GitRepo) EraseFromDisk() error {
|
||||
err := repo.Close()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
path := filepath.Clean(strings.TrimSuffix(repo.path, string(filepath.Separator)+".git"))
|
||||
|
||||
// fmt.Println("Cleaning repo:", path)
|
||||
|
@ -734,6 +734,11 @@ func (repo *GoGitRepo) GetLocalRemote() string {
|
||||
|
||||
// EraseFromDisk delete this repository entirely from the disk
|
||||
func (repo *GoGitRepo) EraseFromDisk() error {
|
||||
err := repo.Close()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
path := filepath.Clean(strings.TrimSuffix(repo.path, string(filepath.Separator)+".git"))
|
||||
|
||||
// fmt.Println("Cleaning repo:", path)
|
||||
|
Loading…
Reference in New Issue
Block a user