Skip to content

Commit

Permalink
Merge pull request #994 from NativeScript/fatme/sync-files-from-app_r…
Browse files Browse the repository at this point in the history
…esources

Sync files that are in App_Resources
  • Loading branch information
Fatme authored and Fatme committed Oct 2, 2015
2 parents ad7bfe0 + 2f430e8 commit fb1257c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/services/usb-livesync-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,15 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
let beforeBatchLiveSyncAction = (filePath: string): IFuture<string> => {
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<string>()();
};

Expand Down

0 comments on commit fb1257c

Please sign in to comment.