Skip to content

Commit

Permalink
fix: Workaround for Windows drive letters with jsoo & pkg (#636)
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Apr 29, 2021
1 parent c9af90e commit d205cde
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compiler/grainc/jsoo_hacks.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
//Provides: caml_make_path
//Requires: caml_current_dir
//Requires: caml_jsstring_of_string
//Requires: caml_root, jsoo_mount_point, MlNodeDevice
if (caml_root.charCodeAt(1) == 58 && caml_root[0] != 'C') {
// This ensure we can find our C:/snapshot/ stuff even when running in a diff drive
// Not the ideal place to do this but it is the easiest to avoid free variables
jsoo_mount_point.push({ path: 'C:/', device: new MlNodeDevice('C:/') });
}
function caml_make_path(name) {
name = caml_jsstring_of_string(name);
// We needed to provide our own `caml_make_path` because it doesn't check
Expand Down

0 comments on commit d205cde

Please sign in to comment.