| 2497 | } |
| 2498 | |
| 2499 | bool IGFD::FileManager::SelectDirectory(const std::shared_ptr<FileInfos>& vInfos) { |
| 2500 | if (!vInfos.use_count()) return false; |
| 2501 | |
| 2502 | bool pathClick = false; |
| 2503 | |
| 2504 | if (vInfos->fileNameExt == "..") { |
| 2505 | pathClick = SetPathOnParentDirectoryIfAny(); |
| 2506 | } else { |
| 2507 | std::string newPath; |
| 2508 | |
| 2509 | if (showDevices) { |
| 2510 | newPath = vInfos->fileNameExt + IGFD::Utils::GetPathSeparator(); |
| 2511 | } else { |
| 2512 | #ifdef __linux__ |
| 2513 | if (fsRoot == m_CurrentPath) |
| 2514 | newPath = m_CurrentPath + vInfos->fileNameExt; |
| 2515 | else |
| 2516 | #endif // __linux__ |
| 2517 | newPath = m_CurrentPath + IGFD::Utils::GetPathSeparator() + vInfos->fileNameExt; |
| 2518 | } |
| 2519 | |
| 2520 | if (m_FileSystemPtr->IsDirectoryCanBeOpened(newPath)) { |
| 2521 | if (showDevices) { |
| 2522 | m_CurrentPath = vInfos->fileNameExt; |
| 2523 | fsRoot = m_CurrentPath; |
| 2524 | } else { |
| 2525 | m_CurrentPath = newPath; //-V820 |
| 2526 | } |
| 2527 | pathClick = true; |
| 2528 | } |
| 2529 | } |
| 2530 | |
| 2531 | return pathClick; |
| 2532 | } |
| 2533 | |
| 2534 | void IGFD::FileManager::SelectAllFileNames() { |
| 2535 | m_SelectedFileNames.clear(); |
no test coverage detected