mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-12 19:24:22 +08:00
完善get_full_path接口
This commit is contained in:
@@ -239,8 +239,12 @@ PYBIND11_EMBEDDED_MODULE(mk_loader, m) {
|
||||
|
||||
m.def("get_full_path", [](const std::string &path, const std::string ¤t_path) -> std::string {
|
||||
py::gil_scoped_release release;
|
||||
return File::absolutePath(path, current_path);
|
||||
});
|
||||
switch (path.front()) {
|
||||
case '/':
|
||||
case '\\': return path;
|
||||
default: return File::absolutePath(path, current_path);
|
||||
}
|
||||
}, py::arg("path"), py::arg("current_path") = "");
|
||||
|
||||
m.def("set_config", [](const std::string &key, const std::string &value) -> bool {
|
||||
py::gil_scoped_release release;
|
||||
|
||||
Reference in New Issue
Block a user