| 210 | } |
| 211 | |
| 212 | bool TVToolDiscovery::setPluginPath(const String& plugin_path, bool create) |
| 213 | { |
| 214 | if (!File::exists(plugin_path)) |
| 215 | { |
| 216 | if (create) |
| 217 | { |
| 218 | QDir path = QDir(plugin_path.toQString()); |
| 219 | QString dir = path.dirName(); |
| 220 | path.cdUp(); |
| 221 | |
| 222 | if (!path.mkdir(dir)) |
| 223 | { |
| 224 | OPENMS_LOG_WARN << "Unable to create plugin directory " << plugin_path << std::endl; |
| 225 | //plugin_path_ = plugin_path; |
| 226 | return false; |
| 227 | } |
| 228 | } |
| 229 | else |
| 230 | { |
| 231 | OPENMS_LOG_WARN << "Unable to set plugin directory: " << plugin_path << " does not exist." << std::endl; |
| 232 | return false; |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | plugin_path_ = plugin_path; |
| 237 | return true; |
| 238 | } |
| 239 | |
| 240 | const std::string TVToolDiscovery::getPluginPath() |
| 241 | { |
no test coverage detected