bugfix for loading Template from URL

NSURL.absoluteString includes "file://", which Path() doesn't expect.
This commit is contained in:
chunkerchunker
2015-09-29 16:54:07 -07:00
parent 9de84d5ca4
commit a297b4ec42

View File

@@ -25,7 +25,7 @@ public class Template {
/// Create a template with a file found at the given URL /// Create a template with a file found at the given URL
public convenience init(URL:NSURL) throws { public convenience init(URL:NSURL) throws {
try self.init(path: Path(URL.absoluteString)) try self.init(path: Path(URL.path!))
} }
/// Create a template with a file found at the given path /// Create a template with a file found at the given path