Use PathHelper.combine when copying assets for Android and BlackBerry
This commit is contained in:
@@ -257,7 +257,7 @@ class AndroidPlatform extends PlatformTarget {
|
|||||||
//asset.flatName += ((extension != "") ? "." + extension : "");
|
//asset.flatName += ((extension != "") ? "." + extension : "");
|
||||||
|
|
||||||
//asset.resourceName = asset.flatName;
|
//asset.resourceName = asset.flatName;
|
||||||
targetPath = destination + "/assets/" + asset.resourceName;
|
targetPath = PathHelper.combine (destination + "/assets/", asset.resourceName);
|
||||||
|
|
||||||
//asset.resourceName = asset.id;
|
//asset.resourceName = asset.id;
|
||||||
//targetPath = destination + "/res/raw/" + asset.flatName + "." + Path.extension (asset.targetPath);
|
//targetPath = destination + "/res/raw/" + asset.flatName + "." + Path.extension (asset.targetPath);
|
||||||
@@ -376,8 +376,9 @@ class AndroidPlatform extends PlatformTarget {
|
|||||||
|
|
||||||
if (asset.type == AssetType.TEMPLATE) {
|
if (asset.type == AssetType.TEMPLATE) {
|
||||||
|
|
||||||
PathHelper.mkdir (Path.directory (destination + asset.targetPath));
|
var targetPath = PathHelper.combine (destination, asset.targetPath);
|
||||||
FileHelper.copyAsset (asset, destination + asset.targetPath, context);
|
PathHelper.mkdir (Path.directory (targetPath));
|
||||||
|
FileHelper.copyAsset (asset, targetPath, context);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -346,19 +346,20 @@ class BlackBerryPlatform extends PlatformTarget {
|
|||||||
|
|
||||||
for (asset in project.assets) {
|
for (asset in project.assets) {
|
||||||
|
|
||||||
PathHelper.mkdir (Path.directory (destination + asset.targetPath));
|
var targetPath = PathHelper.combine (destination, asset.targetPath);
|
||||||
|
PathHelper.mkdir (Path.directory (targetPath));
|
||||||
|
|
||||||
if (asset.type != AssetType.TEMPLATE) {
|
if (asset.type != AssetType.TEMPLATE) {
|
||||||
|
|
||||||
if (asset.type != AssetType.FONT || !project.targetFlags.exists ("html5")) {
|
if (asset.type != AssetType.FONT || !project.targetFlags.exists ("html5")) {
|
||||||
|
|
||||||
FileHelper.copyAssetIfNewer (asset, destination + asset.targetPath);
|
FileHelper.copyAssetIfNewer (asset, targetPath);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
FileHelper.copyAsset (asset, destination + asset.targetPath, context);
|
FileHelper.copyAsset (asset, targetPath, context);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user