--- /dev/null
+Return-Path: <amthrax@drake.mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 652F5431FB6\r
+ for <notmuch@notmuchmail.org>; Sun, 13 May 2012 12:57:23 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 0wbQhxGUu9uh for <notmuch@notmuchmail.org>;\r
+ Sun, 13 May 2012 12:57:22 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU\r
+ [18.9.25.13])\r
+ by olra.theworths.org (Postfix) with ESMTP id 8B3A0431FAE\r
+ for <notmuch@notmuchmail.org>; Sun, 13 May 2012 12:57:22 -0700 (PDT)\r
+X-AuditID: 1209190d-b7fbf6d0000008ba-a0-4fb012214999\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+ by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id DA.C9.02234.12210BF4; Sun, 13 May 2012 15:57:21 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+ by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q4DJvKdr007436; \r
+ Sun, 13 May 2012 15:57:20 -0400\r
+Received: from drake.mit.edu\r
+ (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+ [209.6.116.242]) (authenticated bits=0)\r
+ (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+ by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q4DJvFSY022909\r
+ (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+ Sun, 13 May 2012 15:57:16 -0400 (EDT)\r
+Received: from amthrax by drake.mit.edu with local (Exim 4.77)\r
+ (envelope-from <amthrax@drake.mit.edu>)\r
+ id 1STeup-0003eq-Pl; Sun, 13 May 2012 15:57:15 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/5] go: Update for changes to notmuch_database_get_directory\r
+Date: Sun, 13 May 2012 15:57:06 -0400\r
+Message-Id: <1336939029-13969-3-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.10\r
+In-Reply-To: <1336939029-13969-1-git-send-email-amdragon@mit.edu>\r
+References: <1336939029-13969-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFrrNIsWRmVeSWpSXmKPExsUixCmqrKsotMHfYM8zI4vZrT+YLG60djNa\r
+ NE13trh+cyazxZuV81gdWD0Of13I4jHx/Gk2j1v3X7N7PFt1i9ljy6H3zAGsUVw2Kak5mWWp\r
+ Rfp2CVwZs99PYS74wFcxc9Ej9gbGTTxdjJwcEgImEkt2TGCDsMUkLtxbD2RzcQgJ7GOU+Hl0\r
+ FguEs4FR4u7bG0wQzn0miR1nf0GVzWeU+P5iLStIP5uAhsS2/csZQWwRAWmJnXdns4IUMQt0\r
+ MUr8ftPMDJIQFvCVuLXlCFARBweLgKrEyfZkkDCvgIPE2r5z7BB3yEs8vd8HdhOngKPEsisL\r
+ wVqFgGpOfvzLPIGRfwEjwypG2ZTcKt3cxMyc4tRk3eLkxLy81CJdI73czBK91JTSTYzgMJTk\r
+ 3cH47qDSIUYBDkYlHt4Fouv9hVgTy4orcw8xSnIwKYnypglu8BfiS8pPqcxILM6ILyrNSS0+\r
+ xCjBwawkwrv+IVA5b0piZVVqUT5MSpqDRUmcV1XrnZ+QQHpiSWp2ampBahFMVoaDQ0mCNxdk\r
+ qGBRanpqRVpmTglCmomDE2Q4D9DwFJAa3uKCxNzizHSI/ClGRSlxiGYBkERGaR5cLyxNvGIU\r
+ B3pFmNcVpIoHmGLgul8BDWYCGswvsA5kcEkiQkqqgdF22f3NpXcOXXnwZaaI5PvyiN437up2\r
+ /o4dP7ct83gVY6pf+J27R7cyVELn9Z4Pdz8ExJuqP1u62c2r4NrJJIFu8/xld85XOUQlXvbV\r
+ Tn62YtX+rTu8s7f94j8RFOWWesOYZZKXtnxoUpaT20tRt+Z8i8zcqZGauzbkvDOOWGdn9m+r\r
+ 8JrTvEosxRmJhlrMRcWJAKvubZ/uAgAA\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 13 May 2012 19:57:23 -0000\r
+\r
+---\r
+ bindings/go/src/notmuch/notmuch.go | 13 +++++++------\r
+ bindings/python/notmuch/database.py | 4 ++--\r
+ 2 files changed, 9 insertions(+), 8 deletions(-)\r
+\r
+diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go\r
+index 12de4c8..00bd53a 100644\r
+--- a/bindings/go/src/notmuch/notmuch.go\r
++++ b/bindings/go/src/notmuch/notmuch.go\r
+@@ -191,19 +191,20 @@ func (self *Database) NeedsUpgrade() bool {\r
+ *\r
+ * Can return NULL if a Xapian exception occurs.\r
+ */\r
+-func (self *Database) GetDirectory(path string) *Directory {\r
++func (self *Database) GetDirectory(path string) (*Directory, Status) {\r
+ var c_path *C.char = C.CString(path)\r
+ defer C.free(unsafe.Pointer(c_path))\r
+ \r
+ if c_path == nil {\r
+- return nil\r
++ return nil, STATUS_OUT_OF_MEMORY\r
+ }\r
+ \r
+- c_dir := C.notmuch_database_get_directory(self.db, c_path)\r
+- if c_dir == nil {\r
+- return nil\r
++ var c_dir *C.notmuch_directory_t\r
++ st := Status(C.notmuch_database_get_directory(self.db, c_path, &c_dir))\r
++ if st != STATUS_SUCCESS || c_dir == nil {\r
++ return nil, st\r
+ }\r
+- return &Directory{dir: c_dir}\r
++ return &Directory{dir: c_dir}, st\r
+ }\r
+ \r
+ /* Add a new message to the given notmuch database.\r
+diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py\r
+index 1b1ddc3..0a58dd0 100644\r
+--- a/bindings/python/notmuch/database.py\r
++++ b/bindings/python/notmuch/database.py\r
+@@ -73,8 +73,8 @@ class Database(object):\r
+ \r
+ """notmuch_database_get_directory"""\r
+ _get_directory = nmlib.notmuch_database_get_directory\r
+- _get_directory.argtypes = [NotmuchDatabaseP, c_char_p]\r
+- _get_directory.restype = NotmuchDirectoryP\r
++ _get_directory.argtypes = [NotmuchDatabaseP, c_char_p, POINTER(NotmuchDirectoryP)]\r
++ _get_directory.restype = c_uint\r
+ \r
+ """notmuch_database_get_path"""\r
+ _get_path = nmlib.notmuch_database_get_path\r
+-- \r
+1.7.10\r
+\r