mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-11 05:07:13 +00:00
Fix for loading Cappuccino apps locally on Windows.
Reviewed by me.
This commit is contained in:
@@ -143,8 +143,14 @@ StaticResource.resourceAtURL = function(/*CFURL|String*/ aURL, /*BOOL*/ resolveA
|
||||
resource = resource._children[name];
|
||||
|
||||
else if (resolveAsDirectoriesIfNecessary)
|
||||
resource = new StaticResource(new CFURL(name, resource.URL()), resource, YES, YES);
|
||||
{
|
||||
// We do this because on Windows the path may start with C: and be
|
||||
// misinterpreted as a scheme.
|
||||
if (name !== "/")
|
||||
name = "./" + name;
|
||||
|
||||
resource = new StaticResource(new CFURL(name, resource.URL()), resource, YES, YES);
|
||||
}
|
||||
else
|
||||
throw new Error("Static Resource at " + aURL + " is not resolved (\"" + name + "\")");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user