summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Kolab/Utils/DAVBackend.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Kolab/Utils/DAVBackend.php b/lib/Kolab/Utils/DAVBackend.php
index 4de51ad..9cc434b 100644
--- a/lib/Kolab/Utils/DAVBackend.php
+++ b/lib/Kolab/Utils/DAVBackend.php
@@ -73,9 +73,12 @@ class DAVBackend
// generate a folder UID and set it to IMAP
$uid = rtrim(chunk_split(md5($folder->name . $folder->get_owner() . uniqid('-', true)), 12, '-'), '-');
- self::set_uid($folder, $uid);
+ if (self::set_uid($folder, $uid)) {
+ return $uid;
+ }
- return $uid;
+ // use folder name if we can't write the UID metadata
+ return md5($folder->name . $folder->get_owner());
}
/**