浏览代码

fix for xcode 7

tangshi 10 年之前
父节点
当前提交
a3ae617651
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Common/HttpHandlers.swift

+ 2 - 2
Common/HttpHandlers.swift

@@ -31,7 +31,7 @@ class HttpHandlers {
                         do {
                         do {
                             let files = try fileManager.contentsOfDirectoryAtPath(filePath)
                             let files = try fileManager.contentsOfDirectoryAtPath(filePath)
                             var response = "<h3>\(filePath)</h3></br><table>"
                             var response = "<h3>\(filePath)</h3></br><table>"
-                            response += "".join(files.map { "<tr><td><a href=\"\(request.url)/\($0)\">\($0)</a></td></tr>"} )
+                            response += files.map({ "<tr><td><a href=\"\(request.url)/\($0)\">\($0)</a></td></tr>"}).joinWithSeparator("")
                             response += "</table>"
                             response += "</table>"
                             return HttpResponse.OK(.HTML(response))
                             return HttpResponse.OK(.HTML(response))
                         } catch  {
                         } catch  {
@@ -57,4 +57,4 @@ private extension String {
     func stringByAppendingPathComponent(str: String) -> String {
     func stringByAppendingPathComponent(str: String) -> String {
         return (self as NSString).stringByAppendingPathComponent(str)
         return (self as NSString).stringByAppendingPathComponent(str)
     }
     }
-}
+}