Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use octal for permissions #30

Open
jxu opened this issue Jun 28, 2019 · 0 comments
Open

Use octal for permissions #30

jxu opened this issue Jun 28, 2019 · 0 comments

Comments

@jxu
Copy link
Contributor

jxu commented Jun 28, 2019

There's really no need to do this:

ssh/src/scp.c

Lines 1 to 6 in deee5ba

/* Convert modes to integer:
* > as.integer(as.octmode(as.character('755')))
* 493
* > as.integer(as.octmode(as.character('644')))
* 420
*/

ssh/src/scp.c

Line 26 in deee5ba

assert_scp(ssh_scp_push_directory(scp, subdir, 493L), "ssh_scp_push_directory", scp, ssh);

Pretty much the only use of octal in C is for unix permissions. So just use 0755 and 0644.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant