summaryrefslogtreecommitdiff
path: root/lib/drivers/kolab/kolab_file_storage.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/drivers/kolab/kolab_file_storage.php')
-rw-r--r--lib/drivers/kolab/kolab_file_storage.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/drivers/kolab/kolab_file_storage.php b/lib/drivers/kolab/kolab_file_storage.php
index c7cdc8a..d623b39 100644
--- a/lib/drivers/kolab/kolab_file_storage.php
+++ b/lib/drivers/kolab/kolab_file_storage.php
@@ -1077,6 +1077,15 @@ class kolab_file_storage implements file_storage
$folder = kolab_storage::get_folder($imap_name, 'file');
if (!$folder || !$folder->valid) {
+ $error = $folder->get_error();
+
+ if ($error === kolab_storage::ERROR_IMAP_CONN || $error === kolab_storage::ERROR_CACHE_DB) {
+ throw new Exception("The storage is temporarily unavailable.", file_storage::ERROR_UNAVAILABLE);
+ }
+ else if ($error === kolab_storage::ERROR_NO_PERMISSION) {
+ throw new Exception("Storage error. Access not permitted", file_storage::ERROR_FORBIDDEN);
+ }
+
throw new Exception("Storage error. Folder not found.", file_storage::ERROR);
}