plasma-umass / browsix

Browsix is a Unix-like operating system for the browser.
Other
3.16k stars 182 forks source link

Corrected code for mkdir -p #15

Closed shivamkakkar closed 8 years ago

shivamkakkar commented 8 years ago

Used recursion to handle asynchronous fs.mkdir syscall. To check: mkdir -p a/b/c/d/e f/g/h ls a/b ls a/b/c/d ls f/g

bpowers commented 8 years ago

Hi @shivamkakkar -

Looks promising! Two comments -

First, with this PR the existing mkdir test fails for me in firefox -- function's can't be declared inside of if-statements (only directly inside of other functions or at the top-level of a file).

Second, could you make a new testcase in test/test-mkdir.ts to verify that mkdir works correctly? Basically encoding what you've outlined above as a unit test.

Thanks!

bpowers commented 8 years ago

please still consider this open, I didn't mean to merge yet