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