File download write privilege check?

I just found that Theia file download check whether calling process has write privilege or not before doing actual download. It seems check R_OK privilege is enough. If it should check write privilege, Could anyone explain the reason? Thanks.

[original thread by Jacky Deng]

Nice catch, can you please file a GH issue?

[Jacky Deng]

No problem. If it is ok, I also would like to contribute this trivial patch to study Theia development.

Cool, sure. Go ahead.

adding link to the github issue: https://github.com/theia-ide/theia/issues/3870

[Jacky Deng]

Hi, Kitta, I just submitted pull request:

Please help to review, Thanks.