Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit 35748f9

Browse files
FatmeFatme
Fatme
authored and
Fatme
committed
Merge pull request #388 from telerik/fatme/fix-permission-denied
Ensure that all directories have permissions
2 parents 689f53d + bd52df0 commit 35748f9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

mobile/android/android-device-file-system.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@ export class AndroidDeviceFileSystem implements Mobile.IDeviceFileSystem {
2323

2424
public transferFiles(appIdentifier: string, localToDevicePaths: Mobile.ILocalToDevicePathData[]): IFuture<void> {
2525
return (() => {
26-
_.each(localToDevicePaths, (localToDevicePathData) => this.transferFile(localToDevicePathData.getLocalPath(), localToDevicePathData.getDevicePath()).wait());
26+
_(localToDevicePaths)
27+
.filter(localToDevicePathData => this.$fs.getFsStats(localToDevicePathData.getLocalPath()).wait().isFile())
28+
.each(localToDevicePathData => this.adb.executeCommand(`push "${localToDevicePathData.getLocalPath()}" "${localToDevicePathData.getDevicePath()}"`).wait())
29+
.value();
30+
31+
_(localToDevicePaths)
32+
.filter(localToDevicePathData => this.$fs.getFsStats(localToDevicePathData.getLocalPath()).wait().isDirectory())
33+
.each(localToDevicePathData => this.adb.executeShellCommand(`chmod 0777 "${localToDevicePathData.getDevicePath()}"`).wait())
34+
.value();
2735
}).future<void>()();
2836
}
2937

0 commit comments

Comments
 (0)