/ Check that an existing directory is readable. */ /
| 172 | /* Check that an existing directory is readable. */ |
| 173 | /**************************************************/ |
| 174 | void FileManager::checkExistingReadableDir(QDir dir) { |
| 175 | // Windows Check |
| 176 | #ifndef _WIN32 |
| 177 | if (!dir.isReadable()) { |
| 178 | QLOG_FATAL() << "Directory '" + dir.path() + "' does not have read permission. Aborting program."; |
| 179 | exit(16); |
| 180 | } |
| 181 | #endif // end windows check |
| 182 | if (!dir.exists()) { |
| 183 | QLOG_FATAL() << "Directory '" + dir.path() + "' does not exist. Aborting program"; |
| 184 | exit(16); |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | |
| 189 |
no test coverage detected