Hi All,
I’d like to modify sftp_mkdir() so it will optionally not use a mode for the new directory. This allows the server to create the folder with the default permissions value which some users require. Unfortunately the sftp_mkdir() function requires a mode. So I’m curious to know how you think I should proceed?
There are several possible solutions, my current super simple solution is to pass -1 as the mode which then causes sftp_mkdir to not set the permissions on the folder. That works, but it’s a bit ‘magical’ if you’re not reading the source. Another other option is to create a new API that doesn’t take a mode, but that also has its draw-backs. Any thoughts on how you all would like to see this structured?
Cheers,
Will
_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2018-11-06