Sfoglia il codice sorgente

fixed some bugs in the way it got the folder separator

Luke Ehresman 25 anni fa
parent
commit
6c609ecb83
1 ha cambiato i file con 10 aggiunte e 5 eliminazioni
  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);