zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.47k stars 1.16k forks source link

Set bits in mode used when creating files #3095

Closed niten94 closed 6 months ago

niten94 commented 7 months ago

The bits set in the mode of files that are created are usually bits not set in the umask except execution bits, so files are usually opened with 0666 mode in other programs. The write permission bit of group and other users in the mode is usually cleared because they are set in the umask.

The bits are not set even if they are cleared in the umask when using micro, so the argument is changed in this pull request. I have not tested if it would work when changing the argument. I have also not made a pull request before, so it would be nice if I am told if there is something I did that is strange.

JoeKar commented 7 months ago

Looks feasible.

niten94 commented 7 months ago

I do not think there is something else that has to be changed but the things I thought about changing has been changed in this pull request. If you thought I will make another pull request because I said I have not created one before, what I meant is that it is the first time I have created one.

JoeKar commented 7 months ago

I'm sorry, I fully misunderstood it and confused myself.