Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Commit e10188b

Browse files
committed
Remove plugins folder and revert back to files.h
1 parent 516a383 commit e10188b

File tree

4 files changed

+214
-202
lines changed

4 files changed

+214
-202
lines changed

plugins/snippet.py

Lines changed: 0 additions & 132 deletions
This file was deleted.

plugins/tools.py

Lines changed: 0 additions & 64 deletions
This file was deleted.

src/config.cc

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,23 @@ void Config::load() {
6060
void Config::find_or_create_config_files() {
6161
auto config_dir = home/"config";
6262
auto config_json = config_dir/"config.json";
63-
64-
boost::filesystem::create_directories(config_dir); // io exp captured by calling method
65-
boost::filesystem::create_directories(home/"plugins");
63+
auto plugin_dir = home/"plugins";
64+
65+
auto tools_path = plugin_dir/"tools.py";
66+
auto snippet_path = plugin_dir/"snippet.py";
67+
68+
boost::filesystem::create_directories(config_dir);
69+
boost::filesystem::create_directories(plugin_dir);
6670

6771
if (!boost::filesystem::exists(config_json))
68-
filesystem::write(config_json, configjson); // vars configjson and pluginspy
69-
72+
filesystem::write(config_json, configjson);
73+
if (!boost::filesystem::exists(tools_path))
74+
filesystem::write(tools_path, tools_py);
75+
if (!boost::filesystem::exists(snippet_path))
76+
filesystem::write(snippet_path, snippet_py);
77+
7078
auto juci_style_path = home/"styles";
71-
boost::filesystem::create_directories(juci_style_path); // io exp captured by calling method
79+
boost::filesystem::create_directories(juci_style_path);
7280

7381
juci_style_path/="juci-light.xml";
7482
if(!boost::filesystem::exists(juci_style_path))

0 commit comments

Comments
 (0)