set the data dir of linux to correct path
Change-Id: Id11cde4518507fa6f2a6eefbccc4638ae7e4053d
This commit is contained in:
parent
8caa6347bb
commit
636319fb4c
|
@ -1370,7 +1370,10 @@ int GUI_App::install_plugin(InstallProgressFn pro_fn, WasCancelledFn cancel_fn)
|
|||
|
||||
BOOST_LOG_TRIVIAL(info) << "[install_plugin] enter";
|
||||
// get plugin folder
|
||||
auto plugin_folder = boost::filesystem::path(wxStandardPaths::Get().GetUserDataDir().ToUTF8().data()) / "plugins";
|
||||
std::string data_dir_str = data_dir();
|
||||
boost::filesystem::path data_dir_path(data_dir_str);
|
||||
auto plugin_folder = data_dir_path / "plugins";
|
||||
//auto plugin_folder = boost::filesystem::path(wxStandardPaths::Get().GetUserDataDir().ToUTF8().data()) / "plugins";
|
||||
auto backup_folder = plugin_folder/"backup";
|
||||
if (!boost::filesystem::exists(plugin_folder)) {
|
||||
BOOST_LOG_TRIVIAL(info) << "[install_plugin] will create directory "<<plugin_folder.string();
|
||||
|
@ -1513,7 +1516,10 @@ void GUI_App::restart_networking()
|
|||
|
||||
void GUI_App::remove_old_networking_plugins()
|
||||
{
|
||||
auto plugin_folder = boost::filesystem::path(wxStandardPaths::Get().GetUserDataDir().ToUTF8().data()) / "plugins";
|
||||
std::string data_dir_str = data_dir();
|
||||
boost::filesystem::path data_dir_path(data_dir_str);
|
||||
auto plugin_folder = data_dir_path / "plugins";
|
||||
//auto plugin_folder = boost::filesystem::path(wxStandardPaths::Get().GetUserDataDir().ToUTF8().data()) / "plugins";
|
||||
if (boost::filesystem::exists(plugin_folder)) {
|
||||
BOOST_LOG_TRIVIAL(info) << "[remove_old_networking_plugins] remove the directory "<<plugin_folder.string();
|
||||
try {
|
||||
|
@ -2328,11 +2334,12 @@ __retry:
|
|||
m_device_manager = new Slic3r::DeviceManager(m_agent);
|
||||
else
|
||||
m_device_manager->set_agent(m_agent);
|
||||
std::string data_dir = wxStandardPaths::Get().GetUserDataDir().ToUTF8().data();
|
||||
//std::string data_dir = wxStandardPaths::Get().GetUserDataDir().ToUTF8().data();
|
||||
std::string data_directory = data_dir();
|
||||
|
||||
//BBS set config dir
|
||||
if (m_agent) {
|
||||
m_agent->set_config_dir(data_dir);
|
||||
m_agent->set_config_dir(data_directory);
|
||||
}
|
||||
//BBS set cert dir
|
||||
if (m_agent)
|
||||
|
|
Loading…
Reference in New Issue