Use PathHelper.combine when copying assets for Android and BlackBerry

This commit is contained in:
Joshua Granick
2015-01-16 08:20:35 -08:00
parent d33dd96cdc
commit 46f58e1491
2 changed files with 8 additions and 6 deletions

View File

@@ -257,7 +257,7 @@ class AndroidPlatform extends PlatformTarget {
//asset.flatName += ((extension != "") ? "." + extension : "");
//asset.resourceName = asset.flatName;
targetPath = destination + "/assets/" + asset.resourceName;
targetPath = PathHelper.combine (destination + "/assets/", asset.resourceName);
//asset.resourceName = asset.id;
//targetPath = destination + "/res/raw/" + asset.flatName + "." + Path.extension (asset.targetPath);
@@ -376,8 +376,9 @@ class AndroidPlatform extends PlatformTarget {
if (asset.type == AssetType.TEMPLATE) {
PathHelper.mkdir (Path.directory (destination + asset.targetPath));
FileHelper.copyAsset (asset, destination + asset.targetPath, context);
var targetPath = PathHelper.combine (destination, asset.targetPath);
PathHelper.mkdir (Path.directory (targetPath));
FileHelper.copyAsset (asset, targetPath, context);
}

View File

@@ -346,19 +346,20 @@ class BlackBerryPlatform extends PlatformTarget {
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.FONT || !project.targetFlags.exists ("html5")) {
FileHelper.copyAssetIfNewer (asset, destination + asset.targetPath);
FileHelper.copyAssetIfNewer (asset, targetPath);
}
} else {
FileHelper.copyAsset (asset, destination + asset.targetPath, context);
FileHelper.copyAsset (asset, targetPath, context);
}