|
@@ -213,7 +213,6 @@ static void refreshPurchase(json_t *pluginJ) { |
|
|
|
|
|
|
|
|
// Download zip |
|
|
// Download zip |
|
|
std::string pluginsDir = assetLocal("plugins"); |
|
|
std::string pluginsDir = assetLocal("plugins"); |
|
|
mkdir(pluginsDir.c_str(), 0755); |
|
|
|
|
|
std::string filename = pluginsDir + "/" + slug + ".zip"; |
|
|
std::string filename = pluginsDir + "/" + slug + ".zip"; |
|
|
bool success = requestDownload(url, filename, &downloadProgress); |
|
|
bool success = requestDownload(url, filename, &downloadProgress); |
|
|
if (success) { |
|
|
if (success) { |
|
@@ -243,10 +242,13 @@ void pluginInit() { |
|
|
|
|
|
|
|
|
// Load plugins from global directory |
|
|
// Load plugins from global directory |
|
|
std::string globalPlugins = assetGlobal("plugins"); |
|
|
std::string globalPlugins = assetGlobal("plugins"); |
|
|
|
|
|
printf("Loading plugins from %s\n", globalPlugins.c_str()); |
|
|
loadPlugins(globalPlugins); |
|
|
loadPlugins(globalPlugins); |
|
|
|
|
|
|
|
|
// Load plugins from local directory |
|
|
// Load plugins from local directory |
|
|
std::string localPlugins = assetLocal("plugins"); |
|
|
std::string localPlugins = assetLocal("plugins"); |
|
|
|
|
|
mkdir(localPlugins.c_str(), 0755); |
|
|
|
|
|
printf("Loading plugins from %s\n", localPlugins.c_str()); |
|
|
if (globalPlugins != localPlugins) |
|
|
if (globalPlugins != localPlugins) |
|
|
loadPlugins(localPlugins); |
|
|
loadPlugins(localPlugins); |
|
|
} |
|
|
} |
|
|