Skip to content

Commit

Permalink
[gui] Include binary files packing codebases
Browse files Browse the repository at this point in the history
  • Loading branch information
pajama-coder committed May 11, 2024
1 parent ba8a197 commit 5351a3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gui/pack-codebases.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function addCodebase(name, dirname) {
const filenames = listFilenames(dirpath);
const files = {};
for (const name of filenames) {
let content = fs.readFileSync(path.join(dirpath, name), 'utf8');
let content = fs.readFileSync(path.join(dirpath, name));
if (content !== null) {
files[name] = content;
console.log(' ' + name);
Expand Down
2 changes: 1 addition & 1 deletion src/codebase-store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ CodebaseStore::CodebaseStore(Store *store, const std::string &init_path)
for (const auto &name : i.second) {
size_t size;
if (auto data = tarball.get(i.first + name, size)) {
codebase->set_file(name, Data(data, &s_dp));
codebase->set_file(name, Data(data, size, &s_dp));
if (name == "/main.js" || name == "/proxy.js") {
codebase->set_main(name);
}
Expand Down

0 comments on commit 5351a3f

Please sign in to comment.