[Git][ghc/ghc][wip/js-mkdir] Apply 1 suggestion(s) to 1 file(s)

Josh Meredith (@JoshMeredith) gitlab at gitlab.haskell.org
Wed Apr 19 16:29:17 UTC 2023



Josh Meredith pushed to branch wip/js-mkdir at Glasgow Haskell Compiler / GHC


Commits:
69036ae3 by Sylvain Henry at 2023-04-19T16:29:15+00:00
Apply 1 suggestion(s) to 1 file(s)
- - - - -


1 changed file:

- libraries/base/jsbits/base.js


Changes:

=====================================
libraries/base/jsbits/base.js
=====================================
@@ -898,7 +898,11 @@ function h$mkdir(path, path_offset, mode) {
   try {
     h$fs.mkdirSync(d, {mode: mode});
   } catch(e) {
-    h$errno = e.errno;
+    // we can't directly set errno code, because numbers may not match
+    // e.g. e.errno is -17 for EEXIST while we would expect -20
+    // this is probably an inconsistency between nodejs using the native
+    // environment and everything else using Emscripten-provided headers.
+    h$setErrno(e);
     return -1;
   }
   return 0;



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/69036ae3dd07be53045301fdba05a1258e775371

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/69036ae3dd07be53045301fdba05a1258e775371
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230419/6146d055/attachment.html>


More information about the ghc-commits mailing list