summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-03-12 09:24:58 +0100
committerThomas Mueller <thomas.mueller@tmit.eu>2013-03-12 09:24:58 +0100
commit06992fec6d3d014060f8c4f4a5a75bb759d6c86e (patch)
treef7c79c5b92eeff696c39a52ee663bc0ba5e1e654 /lib
parent09003016686eea2ff674136792e09db49a1f925c (diff)
downloadnextcloud-server-06992fec6d3d014060f8c4f4a5a75bb759d6c86e.tar.gz
nextcloud-server-06992fec6d3d014060f8c4f4a5a75bb759d6c86e.zip
slug generates uniqid in case the file/folder name contains not one single valid character
Diffstat (limited to 'lib')
-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;