chiark / gitweb /
utf32_word_split() and utf8_word_split() splits a string into words
[disorder] / server / rescan.c
index b9be72d9a482da953ef0cffb1955a470ccec4f0f..cc31888ab91be9334aed228fba4322a34e68ab88 100644 (file)
@@ -152,10 +152,12 @@ static void rescan_collection(const struct collection *c) {
       error(0, "cannot convert track path to UTF-8: %s", path);
       continue;
     }
-    /* We use NFC track names */
-    if(!(track = utf8_compose_canon(track, strlen(track), 0))) {
-      error(0, "cannot convert track path to NFC: %s", path);
-      continue;
+    if(config->dbversion > 1) {
+      /* We use NFC track names */
+      if(!(track = utf8_compose_canon(track, strlen(track), 0))) {
+        error(0, "cannot convert track path to NFC: %s", path);
+        continue;
+      }
     }
     D(("track %s", track));
     /* only tracks with a known player are admitted */