Android root path changes (fix #1346)
This commit is contained in:
@@ -774,7 +774,7 @@ class AssetLibrary
|
||||
@:noCompletion private function __resolvePath(path:String):String
|
||||
{
|
||||
path = StringTools.replace(path, "\\", "/");
|
||||
|
||||
|
||||
var colonIdx:Int = path.indexOf(":");
|
||||
if (StringTools.startsWith(path, "http") && colonIdx > 0)
|
||||
{
|
||||
@@ -787,6 +787,13 @@ class AssetLibrary
|
||||
path = StringTools.replace(path, "//", "/");
|
||||
}
|
||||
|
||||
#if android
|
||||
if (StringTools.startsWith(path, "./"))
|
||||
{
|
||||
path = path.substr(2);
|
||||
}
|
||||
#end
|
||||
|
||||
if (path.indexOf("./") > -1)
|
||||
{
|
||||
var split = path.split("/");
|
||||
|
||||
@@ -39,6 +39,8 @@ import sys.FileSystem;
|
||||
|
||||
#if (ios || tvos || emscripten)
|
||||
rootPath = "assets/";
|
||||
#elseif android
|
||||
rootPath = "";
|
||||
#elseif console
|
||||
rootPath = lime.system.System.applicationDirectory;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user