From a297b4ec420e329f3e9d507a064a7779f357dc33 Mon Sep 17 00:00:00 2001 From: chunkerchunker Date: Tue, 29 Sep 2015 16:54:07 -0700 Subject: [PATCH] bugfix for loading Template from URL NSURL.absoluteString includes "file://", which Path() doesn't expect. --- Stencil/Template.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Stencil/Template.swift b/Stencil/Template.swift index 0e968f3..761c87b 100644 --- a/Stencil/Template.swift +++ b/Stencil/Template.swift @@ -25,7 +25,7 @@ public class Template { /// Create a template with a file found at the given URL 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