Skip to content

Commit

Permalink
add assertion for string handling, since workaround support has been …
Browse files Browse the repository at this point in the history
…removed from struct-fu
  • Loading branch information
natevw committed Dec 11, 2015
1 parent fe90e62 commit c0cf4a8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dir.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ dir.addFile = function (vol, dirChain, entryInfo, opts, cb) {
_name: name
});
if (1 || mainEntry.Name._lossy) { // HACK: always write long names until `._lossy` is more useful!
var workaroundTessel427 = ('\uFFFF'.length !== 1);
if (workaroundTessel427) throw Error("Your JS runtime does not have proper Unicode string support. (If Tessel, is your firmware up-to-date?)");

// name entries should be 0x0000-terminated and 0xFFFF-filled
var S_lde_f = S.longDirEntry.fields,
ENTRY_CHUNK_LEN = (S_lde_f.Name1.size + S_lde_f.Name2.size + S_lde_f.Name3.size)/2,
Expand Down

0 comments on commit c0cf4a8

Please sign in to comment.