Quellcode durchsuchen

fixed some bugs in the way it got the folder separator

Luke Ehresman vor 25 Jahren
Ursprung
Commit
6c609ecb83
1 geänderte Dateien mit 10 neuen und 5 gelöschten Zeilen
  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);