|
3 | 3 |
|
4 | 4 | import androidLiveSyncServiceLib = require("../common/mobile/android/android-livesync-service");
|
5 | 5 | import usbLivesyncServiceBaseLib = require("../common/services/usb-livesync-service-base");
|
| 6 | +import helpers = require("../common/helpers"); |
6 | 7 | import path = require("path");
|
7 | 8 |
|
8 | 9 | export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncServiceBase implements IUsbLiveSyncService {
|
@@ -80,13 +81,15 @@ export class AndroidUsbLiveSyncService extends androidLiveSyncServiceLib.Android
|
80 | 81 | let commands = [ this.liveSyncCommands.SyncFilesCommand() ];
|
81 | 82 | this.livesync(deviceAppData.appIdentifier, deviceAppData.deviceProjectRootPath, commands).wait();
|
82 | 83 | } else {
|
83 |
| - this.device.adb.executeShellCommand(`chmod 0777 ${path.join(deviceAppData.deviceProjectRootPath, "app")}`).wait(); |
| 84 | + // TODO: Introduce this.$mobileHelper.correctDevicePath(path: string) { return helpers.stringReplaceAll(path), '\\', '/') } |
| 85 | + // Then later on this.$mobileHelper.buildDevicePath should call `correctDevicePath` before returning the output |
| 86 | + this.device.adb.executeShellCommand(`chmod 0777 ${this.$mobileHelper.buildDevicePath(deviceAppData.deviceProjectRootPath, "app")}`).wait(); |
84 | 87 |
|
85 | 88 | let commands: string[] = [];
|
86 | 89 |
|
87 | 90 | let devicePathRoot = `/data/data/${deviceAppData.appIdentifier}/files`;
|
88 | 91 | _.each(localToDevicePaths, localToDevicePath => {
|
89 |
| - let devicePath = path.join(devicePathRoot, localToDevicePath.getRelativeToProjectBasePath()); |
| 92 | + let devicePath = helpers.stringReplaceAll(path.join(devicePathRoot, localToDevicePath.getRelativeToProjectBasePath()), '\\', '/'); |
90 | 93 | //commands.push(`ls "${path.dirname(devicePath)}" >/dev/null 2>/dev/null || mkdir "${path.dirname(devicePath)}"`);
|
91 | 94 | commands.push(`mv "${localToDevicePath.getDevicePath()}" "${devicePath}"`);
|
92 | 95 | });
|
|
0 commit comments