Skip to content

Commit 2f46a54

Browse files
Fatme HavaluovaFatme Havaluova
authored andcommitted
Fix permission denied when live syncing to android device
1 parent 93874e5 commit 2f46a54

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/services/usb-livesync-service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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)