Skip to content

Commit 4ed488e

Browse files
Fatme HavaluovaFatme Havaluova
Fatme Havaluova
authored and
Fatme Havaluova
committed
Don't try to sync android if some file from app/App_Resources/iOS folder is changed
1 parent a8d23db commit 4ed488e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

lib/common

lib/services/usb-livesync-service.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,17 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
8181
let projectFileInfo = this.getProjectFileInfo(filePath);
8282
let result = path.join(projectFilesPath, path.relative(path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME), projectFileInfo.onDeviceName));
8383

84-
// Handle files that are in App_Resources
85-
if(filePath.indexOf(path.join(constants.APP_FOLDER_NAME, constants.APP_RESOURCES_FOLDER_NAME)) > -1) {
84+
// Handle files that are in App_Resources/<platform>
85+
if(filePath.indexOf(path.join(constants.APP_FOLDER_NAME, constants.APP_RESOURCES_FOLDER_NAME, platformData.normalizedPlatformName)) > -1) {
8686
let appResourcesRelativePath = path.relative(path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME, constants.APP_RESOURCES_FOLDER_NAME, platformData.normalizedPlatformName), filePath);
8787
result = path.join(platformData.platformProjectService.getAppResourcesDestinationDirectoryPath().wait(), appResourcesRelativePath);
8888
}
89+
90+
if(filePath.indexOf(path.join(constants.APP_FOLDER_NAME, constants.APP_RESOURCES_FOLDER_NAME)) > -1 &&
91+
filePath.indexOf(path.join(constants.APP_FOLDER_NAME, constants.APP_RESOURCES_FOLDER_NAME, platformData.normalizedPlatformName)) === -1) {
92+
this.$logger.warn(`Unable to sync ${filePath}.`);
93+
return null;
94+
}
8995

9096
return result;
9197
}).future<string>()();

0 commit comments

Comments
 (0)