| 86 | } |
| 87 | |
| 88 | RemotePCExplorer *GetRemotePCExplorer(const std::string &mount_name) { |
| 89 | if((g_RemotePCExplorer != nullptr) && (g_RemotePCExplorer->GetMountName() != mount_name)) { |
| 90 | DeleteExplorer(g_RemotePCExplorer); |
| 91 | } |
| 92 | |
| 93 | const auto mnt_name_root = fs::GetPathRoot(mount_name); |
| 94 | EnsureExplorer(g_RemotePCExplorer, mnt_name_root); |
| 95 | |
| 96 | if(mount_name != mnt_name_root) { |
| 97 | auto base_path = fs::GetPathWithoutRoot(mount_name); |
| 98 | base_path.erase(0, 1); |
| 99 | g_RemotePCExplorer->NavigateForward(base_path); |
| 100 | } |
| 101 | return g_RemotePCExplorer; |
| 102 | } |
| 103 | |
| 104 | DriveExplorer *GetDriveExplorer(const UsbHsFsDevice &drive) { |
| 105 | if((g_DriveExplorer != nullptr) && !drive::DrivesEqual(g_DriveExplorer->GetDrive(), drive)) { |
no test coverage detected