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