cbalint13 commented on code in PR #19840:
URL: https://github.com/apache/tvm/pull/19840#discussion_r3441952609
##########
apps/cpp_rpc/rpc_env.cc:
##########
@@ -298,8 +248,13 @@ std::string BuildSharedLibrary(std::string file) {
if (support::EndsWith(file, ".o")) {
CreateShared(file_name, {file});
} else if (support::EndsWith(file, ".tar")) {
- const std::string tmp_dir = "./rpc/tmp/";
- mkdir(tmp_dir.c_str(), 0777);
+ const std::string tmp_dir = (std::filesystem::path(base_) /
"tmp").string();
+ std::filesystem::create_directories(tmp_dir);
+ std::error_code perm_ec;
+ std::filesystem::permissions(tmp_dir,
+ std::filesystem::perms::all,
+ std::filesystem::perm_options::replace,
+ perm_ec);
Review Comment:
As commented before, original code created 0777 permission, so we stick to
that.
These temporaries needs to have full right no matter on what platform.
Security is second in priority to execution.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]