فهرست منبع

fixed some bugs in the way it got the folder separator

Luke Ehresman 25 سال پیش
والد
کامیت
6c609ecb83
1فایلهای تغییر یافته به همراه10 افزوده شده و 5 حذف شده
  1. 10 5
      functions/imap.php

+ 10 - 5
functions/imap.php

@@ -61,12 +61,17 @@
       fputs($imapConnection, ". list \"\" \"\"\n");
       $read = fgets($imapConnection, 1024);
 
-      $pos = strrpos($read, "\"");
-      $read = substr($read, 0, $pos);
-
-      $pos = strrpos($read, "\"");
-      $read = substr($read, 0, $pos);
+      if (strrpos($read, "\"") == strlen($read)) {
+         $pos = strrpos($read, "\"");
+         $read = substr($read, 0, $pos);
 
+         $pos = strrpos($read, "\"");
+         $read = substr($read, 0, $pos);
+      } else {
+         $pos = strrpos($read, " ");
+         $read = substr($read, 0, $pos);
+      }
+   
       $pos = strrpos($read, "\"");
       $read = substr($read, 0, $pos);