From 2f430e8e4ce731c12397bed0c81527532b2d1efc Mon Sep 17 00:00:00 2001 From: Fatme Havaluova Date: Thu, 1 Oct 2015 17:58:35 +0300 Subject: [PATCH] Sync files that are in App_Resources Fixes https://github.com/NativeScript/nativescript-cli/issues/942 --- lib/services/usb-livesync-service.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/services/usb-livesync-service.ts b/lib/services/usb-livesync-service.ts index b1d08767e5..22513961e7 100644 --- a/lib/services/usb-livesync-service.ts +++ b/lib/services/usb-livesync-service.ts @@ -79,7 +79,15 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer let beforeBatchLiveSyncAction = (filePath: string): IFuture => { return (() => { let projectFileInfo = this.getProjectFileInfo(filePath); - return path.join(projectFilesPath, path.relative(path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME), projectFileInfo.onDeviceName)); + let result = path.join(projectFilesPath, path.relative(path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME), projectFileInfo.onDeviceName)); + + // Handle files that are in App_Resources + if(filePath.indexOf(path.join(constants.APP_FOLDER_NAME, constants.APP_RESOURCES_FOLDER_NAME)) > -1) { + let appResourcesRelativePath = path.relative(path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME, constants.APP_RESOURCES_FOLDER_NAME, platformData.normalizedPlatformName), filePath); + result = path.join(platformData.platformProjectService.getAppResourcesDestinationDirectoryPath().wait(), appResourcesRelativePath); + } + + return result; }).future()(); };