| 571 | } |
| 572 | |
| 573 | bool Application::findPwd(bool waitForConfigArg) |
| 574 | { |
| 575 | if (waitForConfigArg) { |
| 576 | if (!waitForConfig()) { |
| 577 | return false; |
| 578 | } |
| 579 | m_connection.applyRawConfig(); |
| 580 | } |
| 581 | |
| 582 | // find directory for working directory |
| 583 | const QString pwd(QDir::currentPath()); |
| 584 | int dummy; |
| 585 | m_pwd.dirObj = m_connection.findDirInfoByPath(pwd, m_pwd.subDir, dummy); |
| 586 | if (m_pwd) { |
| 587 | return true; |
| 588 | } |
| 589 | |
| 590 | // handle error |
| 591 | cerr << Phrases::Error << "The current working directory \"" << pwd.toLocal8Bit().data() << "\" is not (part of) a Syncthing folder."; |
| 592 | cerr << Phrases::End << flush; |
| 593 | m_requiresMainEventLoop = false; |
| 594 | QCoreApplication::exit(2); |
| 595 | return false; |
| 596 | } |
| 597 | |
| 598 | void Application::printDir(const RelevantDir &relevantDir) const |
| 599 | { |
nothing calls this directly
no test coverage detected