summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/files/mapper.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/files/mapper.php b/lib/files/mapper.php
index c5f1f9888db..418ef354f9c 100644
--- a/lib/files/mapper.php
+++ b/lib/files/mapper.php
@@ -219,10 +219,8 @@ class Mapper
// remove unwanted characters
$text = preg_replace('~[^-\w]+~', '', $text);
- if (empty($text))
- {
- // TODO: we better generate a guid in this case
- return 'n-a';
+ if (empty($text)) {
+ return uniqid();
}
return $text;