Skip to content

Commit

Permalink
Fixup FileFlags condition
Browse files Browse the repository at this point in the history
  • Loading branch information
carlopi authored and Mytherin committed Apr 24, 2024
1 parent 58fcb9a commit b4d2182
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/duckdb-wasm/src/bindings/runtime_browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const BROWSER_RUNTIME: DuckDBRuntime & {
mod.HEAPF64[(result >> 3) + 0] = 1;
mod.HEAPF64[(result >> 3) + 1] = data;
return result;
} else if (flags != FileFlags.FILE_FLAGS_READ) {
} else if ((flags & FileFlags.FILE_FLAGS_READ) == 0) {
throw new Error(`Opening file ${file.fileName} failed: unsupported file flags: ${flags}`);
}

Expand Down

0 comments on commit b4d2182

Please sign in to comment.