From d8208e6b6b78ace61f1c8bc19dcb0e87a8c9a3e5 Mon Sep 17 00:00:00 2001 From: ivanbuhov Date: Tue, 29 Nov 2016 17:50:54 +0200 Subject: [PATCH] Fix App Resources copying operation --- lib/services/platform-service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/services/platform-service.ts b/lib/services/platform-service.ts index 6ad2e2ac34..11744387f1 100644 --- a/lib/services/platform-service.ts +++ b/lib/services/platform-service.ts @@ -285,11 +285,11 @@ export class PlatformService implements IPlatformService { return (() => { let platformData = this.$platformsData.getPlatformData(platform); let appDestinationDirectoryPath = path.join(platformData.appDestinationDirectoryPath, constants.APP_FOLDER_NAME); - let appResourcesDestination = platformData.platformProjectService.getAppResourcesDestinationDirectoryPath().wait(); - this.$fs.ensureDirectoryExists(appResourcesDestination).wait(); // Should be deleted let appResourcesDirectoryPath = path.join(appDestinationDirectoryPath, constants.APP_RESOURCES_FOLDER_NAME); if (this.$fs.exists(appResourcesDirectoryPath).wait()) { platformData.platformProjectService.prepareAppResources(appResourcesDirectoryPath).wait(); + let appResourcesDestination = platformData.platformProjectService.getAppResourcesDestinationDirectoryPath().wait(); + this.$fs.ensureDirectoryExists(appResourcesDestination).wait(); shell.cp("-Rf", path.join(appResourcesDirectoryPath, platformData.normalizedPlatformName, "*"), appResourcesDestination); this.$fs.deleteDirectory(appResourcesDirectoryPath).wait(); }