]> source.dussan.org Git - gitblit.git/commitdiff
Fix exception in FileTicketService when deleting a repository 13/213/1
authorJames Moger <james.moger@gitblit.com>
Fri, 31 Oct 2014 13:19:03 +0000 (09:19 -0400)
committerJames Moger <james.moger@gitblit.com>
Fri, 31 Oct 2014 13:19:03 +0000 (09:19 -0400)
releases.moxie
src/main/java/com/gitblit/tickets/FileTicketService.java

index 5fead38dec8be12aaa371d7f7576ed0887870a8f..41259a7d70dda6b551665095d00aed35731b3c39 100644 (file)
@@ -16,6 +16,7 @@ r27: {
     security: ~
     fixes:
     - Fix exception when viewing a ticket with a patchset where the integration branch does not exist (issue-521, ticket-212)
+    - Fix exception when deleting a repository using the FileTicketService (issue-522, ticket-213)
     changes:
     - Replaced Dagger with Guice (ticket-80)
     - Use release name as root directory in Gitblit GO artifacts (ticket-109)
index c8346d1430f225703a7620bfc62e6e79632f0111..1e82f0de19a3ec6e916a6e1d8092be3dcec515c2 100644 (file)
@@ -493,6 +493,10 @@ public class FileTicketService extends ITicketService {
        @Override
        protected boolean deleteAllImpl(RepositoryModel repository) {
                Repository db = repositoryManager.getRepository(repository.name);
+               if (db == null) {
+                       // the tickets no longer exist because the db no longer exists
+                       return true;
+               }
                try {
                        File dir = new File(db.getDirectory(), TICKETS_PATH);
                        return FileUtils.delete(dir);