Skip to content

Commit

Permalink
Fixed bug that unnecessarily warned users about files not existing an…
Browse files Browse the repository at this point in the history
…d fixed bug where boost format was missing a reference.
  • Loading branch information
tristanisham committed Mar 6, 2024
1 parent 7ab09e8 commit 2e9257d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/vm/std/fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ void lib::fs::fileAlloc(WrenVM* vm) {
// lib::abort(vm, (boost::format("Unable to canonicalize %1%") % path).str());
}
} catch (std::bad_alloc const& e) {
lib::abort(vm, (boost::format("Unable to allocate appropriate memory %1") % e.what()).str());
}

if (!std::filesystem::exists(full_path)) {
lib::abort(vm, (boost::format("File %1% doesn't exist") % full_path).str());
lib::abort(vm, (boost::format("Unable to allocate appropriate memory %1%") % e.what()).str());
}

*file = fopen(full_path.c_str(), mode);
Expand Down

0 comments on commit 2e9257d

Please sign in to comment.