Skip to content

Commit

Permalink
fixes bug
Browse files Browse the repository at this point in the history
  • Loading branch information
actboy168 committed Apr 26, 2024
1 parent 16b4d0c commit 3634e28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/launcher/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace luadebug::autoattach {
log::fatal("dll_path error");
return attach_status::fatal;
}
auto root = r.value().parent_path().parent_path();
auto root = (*r).parent_path().parent_path();
auto buf = readfile(root / "script" / "attach.lua");
if (lua::loadbuffer(L, buf.data(), buf.size(), "=(attach.lua)")) {
log::fatal("load attach.lua error: {}", lua::tostring(L, -1));
Expand Down
2 changes: 1 addition & 1 deletion src/launcher/util/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace luadebug::log {
if (!dllpath) {
return;
}
auto rootpath = dllpath.value().parent_path().parent_path();
auto rootpath = (*dllpath).parent_path().parent_path();
auto path = std::format("{}/tmp/pid_{}", rootpath.generic_u8string(),
#if defined(_WIN32)
GetCurrentProcessId()
Expand Down

0 comments on commit 3634e28

Please sign in to comment.