]> khamidou — GitHub mirrors - imapclient.git/commitdiff
folder_exists calls LIST with quoted empty string
authorMathieu Agopian <mathieu.agopian@gmail.com>
Fri, 29 Mar 2013 08:24:41 +0000 (09:24 +0100)
committerMathieu Agopian <mathieu.agopian@gmail.com>
Fri, 29 Mar 2013 08:24:41 +0000 (09:24 +0100)
imapclient/imapclient.py

index 503be0a54aff04aac26d19d1ea614fd5709e8100..eb5854af2af73ff09f1a5546b09d570f5ff11713 100644 (file)
@@ -459,7 +459,7 @@ class IMAPClient(object):
     def folder_exists(self, folder):
         """Return ``True`` if *folder* exists on the server.
         """
-        data = self._command_and_check('list', '', self.encode_quote(folder))
+        data = self._command_and_check('list', '""', self.encode_quote(folder))
         data = [x for x in data if x]
         return len(data) == 1 and data[0] != None