Example #1
0
boolByte errorReporterCopyPlugins(ErrorReporter self, PluginChain pluginChain) {
  CharString pluginAbsolutePath = NULL;
  Plugin currentPlugin = NULL;
  boolByte failed = false;
  unsigned int i;
  PlatformInfo platform = newPlatformInfo();

  for (i = 0; i < pluginChain->numPlugins; i++) {
    currentPlugin = pluginChain->plugins[i];
    pluginAbsolutePath = currentPlugin->pluginAbsolutePath;

    if (charStringIsEmpty(pluginAbsolutePath)) {
      logInfo(
          "Plugin '%s' does not have an absolute path and could not be copied",
          currentPlugin->pluginName->data);
    } else if (platform->type == PLATFORM_MACOSX) {
      failed |= !_copyDirectoryToErrorReportDir(self, pluginAbsolutePath);
    } else {
      failed |= !errorReportCopyFileToReport(self, pluginAbsolutePath);
    }
  }

  freePlatformInfo(platform);
  return (boolByte)!failed;
}
Example #2
0
boolByte errorReporterCopyPlugins(ErrorReporter self, PluginChain pluginChain) {
  CharString pluginAbsolutePath;
  Plugin currentPlugin;
  boolByte failed = false;
  unsigned int i;

  pluginAbsolutePath = newCharString();
  for(i = 0; i < pluginChain->numPlugins; i++) {
    currentPlugin = pluginChain->plugins[i];
    currentPlugin->getAbsolutePath(currentPlugin, pluginAbsolutePath);
    if(getPlatformType() == PLATFORM_MACOSX) {
      failed |= !_copyDirectoryToErrorReportDir(self, pluginAbsolutePath);
    }
    else {
      failed |= !errorReportCopyFileToReport(self, pluginAbsolutePath);
    }
  }

  freeCharString(pluginAbsolutePath);
  return !failed;
}