From: Tay Ray Chuan Date: Sat, 10 Apr 2010 02:19:57 +0000 (+0800) Subject: DiskObjectStore: create pack dir if necessary X-Git-Tag: rc-test-temp-v1~1 X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=157e5c6133c4ee5a52b7a763995c28ef2d937786;p=jelmer%2Fdulwich-libgit2.git DiskObjectStore: create pack dir if necessary --- diff --git a/dulwich/object_store.py b/dulwich/object_store.py index d8c78d7..cd8dada 100644 --- a/dulwich/object_store.py +++ b/dulwich/object_store.py @@ -340,6 +340,8 @@ class DiskObjectStore(PackBasedObjectStore): super(DiskObjectStore, self).__init__() self.path = path self.pack_dir = os.path.join(self.path, PACKDIR) + if not os.path.isdir(self.pack_dir): + os.makedirs(self.pack_dir) self._pack_cache_time = 0 def _load_packs(self):