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

Chmod parent dirs when syncing files on Android #943

Merged
merged 1 commit into from
Apr 13, 2017

Conversation

petekanev
Copy link
Contributor

Pushing files as part of the livesync procedure on Android doesn't always update parent directories' permissions on the device unless the changes require a rebuild of the application, at which point they will be included in a list of files and directories to be chmod`d.

I propose that files being pushed in that temporary directory always have their parent's permissions explicitly set to 777 to allow their removal when necessary.

@justcodebuilduser
Copy link

❤️

.map(async localToDevicePathData => {
const devicePath = localToDevicePathData.getDevicePath();
let sections = devicePath.split("/");
let parentDir = sections.slice(0, sections.length - 1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of splitting and joining, I believe you can use path.dirname(devicePath) - have you tried it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not, thanks for making me aware of it!

@petekanev petekanev force-pushed the pete/chmod-livesync-dirs branch from 46b0708 to e65a7c1 Compare April 12, 2017 15:32
@justcodebuilduser
Copy link

❤️

Copy link
Collaborator

@rosen-vladimirov rosen-vladimirov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@rosen-vladimirov rosen-vladimirov merged commit d874d4d into master Apr 13, 2017
@rosen-vladimirov rosen-vladimirov deleted the pete/chmod-livesync-dirs branch April 13, 2017 13:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants