| 451 | } |
| 452 | |
| 453 | std::string |
| 454 | ProcInfo::applicationDirPath(const char* argv0Param) |
| 455 | { |
| 456 | |
| 457 | std::string filePath = ProcInfo::applicationFilePath(argv0Param); |
| 458 | std::size_t foundSlash = filePath.find_last_of('/'); |
| 459 | |
| 460 | if (foundSlash == std::string::npos) { |
| 461 | #ifdef __NATRON_WIN32__ |
| 462 | foundSlash = filePath.find_last_of('\\'); |
| 463 | if (foundSlash == std::string::npos) { |
| 464 | return std::string(); |
| 465 | } |
| 466 | #else |
| 467 | return std::string(); |
| 468 | #endif |
| 469 | } |
| 470 | |
| 471 | return filePath.substr(0, foundSlash); |
| 472 | } |
| 473 | |
| 474 | |
| 475 | bool |