| 206 | } |
| 207 | |
| 208 | void autoCreateDirectory(const fs::path& path) |
| 209 | { |
| 210 | try |
| 211 | { |
| 212 | if (!fs::is_directory(path)) |
| 213 | { |
| 214 | auto path8 = path.u8string(); |
| 215 | Logging::info("Creating directory: {}", path8.c_str()); |
| 216 | fs::create_directories(path); |
| 217 | // clang-format off |
| 218 | fs::permissions( |
| 219 | path, |
| 220 | fs::perms::owner_all | |
| 221 | fs::perms::group_read | fs::perms::group_exec | |
| 222 | fs::perms::others_read | fs::perms::others_exec); |
| 223 | // clang-format on |
| 224 | } |
| 225 | } |
| 226 | catch (const std::exception& e) |
| 227 | { |
| 228 | Logging::error("Unable to create directory: {}", e.what()); |
| 229 | Ui::showMessageBox("Unable to create directory", e.what()); |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | static fs::path tryPathOrDefault(fs::path pathToTry, PathId defaultPathId) |
| 234 | { |
no test coverage detected