Skip to content

Commit 26a2c3f

Browse files
FatmeFatme
authored andcommitted
Merge pull request #657 from NativeScript/fatme/fix-ios-livesync
Fix livesync
2 parents 93874e5 + bbbe8e7 commit 26a2c3f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/services/usb-livesync-service.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
3030

3131
public liveSync(platform: string): IFuture<void> {
3232
return (() => {
33-
platform = this.initialize(platform).wait();
33+
platform = platform || this.initialize(platform).wait();
3434
this.$platformService.preparePlatform(platform).wait();
3535

3636
let platformData = this.$platformsData.getPlatformData(platform.toLowerCase());
@@ -107,7 +107,9 @@ export class AndroidUsbLiveSyncService extends androidLiveSyncServiceLib.Android
107107
let devicePathRoot = `/data/data/${deviceAppData.appIdentifier}/files`;
108108
_.each(localToDevicePaths, localToDevicePath => {
109109
let devicePath = this.$mobileHelper.correctDevicePath(path.join(devicePathRoot, localToDevicePath.getRelativeToProjectBasePath()));
110-
commands.push(`mv "${localToDevicePath.getDevicePath()}" "${devicePath}"`);
110+
if(this.$fs.getFsStats(localToDevicePath.getLocalPath()).wait().isFile()) {
111+
commands.push(`mv "${localToDevicePath.getDevicePath()}" "${devicePath}"`);
112+
}
111113
});
112114

113115
commands.push(`rm -rf ${this.$mobileHelper.buildDevicePath(devicePathRoot, "code_cache", "secondary_dexes", "proxyThumb")}`);

0 commit comments

Comments
 (0)