Open Night-walker opened 8 years ago
Hello @daokoder,
I am getting started with this. Where should this be handled? As a part of "stream" module or a part of the platform?
Hi @kunal, welcome to this project. I'm glad you're be willing to help us.
Could you please be more specific what you mean by "handled in the platform"? In kernel/daoPlatform.c
there you can see Dao_OpenFile()
calls directly fopen()
. From what I found is it simply undefined if one tries to fopen a directory (see e.g. https://stackoverflow.com/a/18193383 ) and therefore we should check before trying to call fopen on a directory because I can't think of any use case for having a stream interface for a directory. Therefore @Night-walker calls it an invalid stream.
It's definitely to be corrected in modules/stream/dao_stream.c
.
We're also trying hard to keep the Dao core as minimal as possible. If not absolutely necessary, we don't add such checks into the core, but rather to the user inputs (e.g. inputs from a programmer, which is the source code he's writing).
@daokoder your point of view?
Thanks, @dumblob for the response. Yes by the platform I meant core. Yes, I will work on fixing this in the stream module.
Any updates here? :)
@kunal I think we shall maintain a separate git tree which will be used as "staging" (more or less according to this definition: https://lwn.net/Articles/324279/ ):
https://github.com/dumblob/dao
Could you just close your pull request to this repository and make the pull request to the staging repository?
@daokoder is being pretty busy during the last year or two and the project needs to get forward. @daokoder will of course stay as the main architect and maintainer of the project.
@dumblob Will do. Thank you.
@kunal could you post your pull request to the repository https://github.com/dumblob/dao ? I would be happy to merge it.
@dumblob Yes I will. Have been busy with travels. Will try to do it asap.
@dumblob I have sent pull request. Can you also create a staging area for dao-modules? :) I am working on modules as well.
Have been busy with travels. Will try to do it asap.
No need to hurry - I just wanted to make sure it's alright from your point of view.
I have sent pull request.
I'll review it in the next days :wink:.
Can you also create a staging area for dao-modules?
Done.