You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had to implement njs_file_tree_walk() from scratch because ftw.h is a total mess, even though it is a POSIX interface.
Alpine (libc musl) vs Ubuntu (glibc) vs Freebsd all they respond differently to _XOPEN_SOURCE feature macros.
Activity
drsm commentedon Jan 20, 2020
https://gist.github.com/drsm/3f4567cacbc0f088862b04a0b5d5d7f2 (Ready)
drsm commentedon Jan 21, 2020
TODO: (in no particular order)
xeioex commentedon Jan 22, 2020
Thanks, committed with some improvements: cd10a4b.
drsm commentedon Jan 23, 2020
https://gist.github.com/drsm/d950402101765c7395c36cb4051576ba (Ready)
@xeioex please take a look.
isn't it broken by design?
xeioex commentedon Jan 23, 2020
@drsm
Looks promising. Have no issues with the design.
drsm commentedon Jan 25, 2020
I've updated the patch above.
The solution is compatible with nodejs except the cases like
fs.promises.readFile()(our version will throw).xeioex commentedon Jan 28, 2020
@drsm I am on large (Array objects) refactoring now. I plan to merge the patch this or next week.
drsm commentedon Jan 30, 2020
https://gist.github.com/drsm/d0b44c1d6252a9c2a0627c15aed97c31 (outdated)
drsm commentedon Jan 31, 2020
JFF
xeioex commentedon Feb 7, 2020
@drsm
Thanks, committed (096f5aa, d71a881) with some refactoring included.
drsm commentedon Feb 10, 2020
https://gist.github.com/drsm/3d0402f41dc332b3c87bbe5dfcb7892e
11 remaining items
xeioex commentedon Jul 24, 2020
@drsm
Thanks, committed with some changes. Most notably avoiding any changes to
const char *memory.drsm commentedon Jul 25, 2020
@xeioex
Improved fs.rmdir() to support recursive directory removal.
https://gist.github.com/drsm/38714fecb523293d70296741cb62eb02
The upstream solution is still buggy
xeioex commentedon Jul 27, 2020
@drsm
Take a look, https://gist.github.com/xeioex/cf5d4d451642510777552614ca1396af
Coverity (static analyser) found the following issue with the previous mkdir patch.
drsm commentedon Jul 27, 2020
@xeioex
Yes, there is a race condition.
I was unsure about error codes, so decided to
statit first :).https://github.com/freebsd/freebsd/blob/master/bin/mkdir/mkdir.c#L182
The fix looks fine to me.
drsm commentedon Jul 27, 2020
@xeioex
BTW, we may lose an original
mkdir()errnoafter stat:https://github.com/openbsd/src/blob/master/bin/mkdir/mkdir.c#L150
but i don't think it's a serous issue.
xeioex commentedon Aug 10, 2020
@drsm
https://gist.github.com/144da2743e6c6230bcb6cddb22ea951d
I had to implement
njs_file_tree_walk()from scratch because ftw.h is a total mess, even though it is a POSIX interface.Alpine (libc musl) vs Ubuntu (glibc) vs Freebsd all they respond differently to _XOPEN_SOURCE feature macros.
drsm commentedon Aug 11, 2020
@xeioex
Great Job!
xeioex commentedon Aug 11, 2020
@drsm
Committed in f8c8fd8, thanks.
xeioex commentedon Sep 28, 2020
@drsm
I added support for Buffer object in fs module, feel free to catch any issues.
drsm commentedon Sep 28, 2020
@xeioex
Thanks!
This place is questionable:
vs.
xeioex commentedon Oct 1, 2020
@drsm
Agree, take a look
https://gist.github.com/xeioex/8d3fa0a42c04042693c9db5196f3bd52
it also eliminates dynamic allocation for path arguments.
xeioex commentedon Aug 20, 2022
Hi @drsm,
You may help by testing the following patch
to test njs
to compare with node