From af2129c254e9cc49242cd896584510061799bdea Mon Sep 17 00:00:00 2001
From: Lunny Xiao <xiaolunwen@gmail.com>
Date: Sun, 30 Mar 2014 11:03:38 +0800
Subject: [PATCH] bug fixed delete repo

---
 models/repo.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/models/repo.go b/models/repo.go
index 6fda2f42fda..5ca98dec0ca 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -398,7 +398,7 @@ func DeleteRepository(userId, repoId int64, userName string) (err error) {
 		session.Rollback()
 		return err
 	}
-	if _, err := session.Delete(&Access{UserName: userName, RepoName: repo.Name}); err != nil {
+	if _, err := session.Delete(&Access{RepoName: strings.ToLower(path.Join(userName, repo.Name))}); err != nil {
 		session.Rollback()
 		return err
 	}