1. 增加拦车器锁定功能。
parent
2e6c1a3385
commit
ec2b03473c
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
|
||||
std::filesystem::path getExeDir()
|
||||
{
|
||||
char buf[PATH_MAX] = {0};
|
||||
ssize_t len = readlink("/proc/self/exe", buf, sizeof(buf)-1);
|
||||
return std::filesystem::path(std::string(buf, len)).parent_path();
|
||||
}
|
||||
Loading…
Reference in New Issue