diff --git a/lib/common b/lib/common index 570bda1c4a..aa3b05fe45 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit 570bda1c4a453cad02688bd5e59b2791cedc87ed +Subproject commit aa3b05fe457055b428273c5d9d6022a75779f673 diff --git a/lib/services/usb-livesync-service.ts b/lib/services/usb-livesync-service.ts index 22513961e7..94f7219660 100644 --- a/lib/services/usb-livesync-service.ts +++ b/lib/services/usb-livesync-service.ts @@ -81,12 +81,18 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer let projectFileInfo = this.getProjectFileInfo(filePath); 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) { + // Handle files that are in App_Resources/ + if(filePath.indexOf(path.join(constants.APP_FOLDER_NAME, constants.APP_RESOURCES_FOLDER_NAME, platformData.normalizedPlatformName)) > -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); } + if(filePath.indexOf(path.join(constants.APP_FOLDER_NAME, constants.APP_RESOURCES_FOLDER_NAME)) > -1 && + filePath.indexOf(path.join(constants.APP_FOLDER_NAME, constants.APP_RESOURCES_FOLDER_NAME, platformData.normalizedPlatformName)) === -1) { + this.$logger.warn(`Unable to sync ${filePath}.`); + return null; + } + return result; }).future()(); };