MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / checkExistingReadableDir

Method checkExistingReadableDir

settings/filemanager.cpp:174–186  ·  view source on GitHub ↗

/ Check that an existing directory is readable. */ /

Source from the content-addressed store, hash-verified

172/* Check that an existing directory is readable. */
173/**************************************************/
174void 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

Callers 1

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected