Checking for removable media on Chrome OS.

This commit is contained in:
Vojtech Bubnik 2021-03-15 17:42:18 +01:00
parent d695e090ef
commit fc0e2d578f

View File

@ -186,8 +186,13 @@ namespace search_for_drives_internal
{ {
//confirms if the file is removable drive and adds it to vector //confirms if the file is removable drive and adds it to vector
//if not same file system - could be removable drive if (
if (! compare_filesystem_id(path, parent_path)) { #ifdef __linux__
// Chromium mounts removable drives in a way that produces the same device ID.
platform_flavor() == PlatformFlavor::LinuxOnChromium ||
#endif
// If not same file system - could be removable drive.
! compare_filesystem_id(path, parent_path)) {
//free space //free space
boost::system::error_code ec; boost::system::error_code ec;
boost::filesystem::space_info si = boost::filesystem::space(path, ec); boost::filesystem::space_info si = boost::filesystem::space(path, ec);