]> git.notmuchmail.org Git - notmuch/commitdiff
python: allow an empty path as parameter to Database.get_directory
authorJustus Winter <4winter@informatik.uni-hamburg.de>
Mon, 20 Feb 2012 23:56:07 +0000 (00:56 +0100)
committerJustus Winter <4winter@informatik.uni-hamburg.de>
Mon, 20 Feb 2012 23:56:07 +0000 (00:56 +0100)
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
bindings/python/notmuch/database.py

index d8413671ad5610938909540076042e602d8eac6e..ab3cdec53738ee5e1398e5efea766ebba85e6629 100644 (file)
@@ -351,7 +351,7 @@ class Database(object):
         """
         self._assert_db_is_initialized()
         # sanity checking if path is valid, and make path absolute
-        if path[0] == os.sep:
+        if path and path[0] == os.sep:
             # we got an absolute path
             if not path.startswith(self.get_path()):
                 # but its initial components are not equal to the db path