[FarGroup/FarManager] master: Continue 6336 (19fbebf1b)

0 views
Skip to first unread message

farg...@farmanager.com

unread,
May 29, 2024, 12:45:46 PMMay 29
to farco...@googlegroups.com
Repository : https://github.com/FarGroup/FarManager
On branch : master
Link : https://github.com/FarGroup/FarManager/commit/19fbebf1b761feaf92588bc390d396016b897b3e

>---------------------------------------------------------------

commit 19fbebf1b761feaf92588bc390d396016b897b3e
Author: Alex Alabuzhev <alab...@gmail.com>
Date: Wed May 29 17:33:05 2024 +0100

Continue 6336


>---------------------------------------------------------------

19fbebf1b761feaf92588bc390d396016b897b3e
far/changelog | 5 +++++
far/hotplug.cpp | 6 +++---
far/vbuild.m4 | 2 +-
3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/far/changelog b/far/changelog
index d22c06bab..1be104e2c 100644
--- a/far/changelog
+++ b/far/changelog
@@ -1,3 +1,8 @@
+--------------------------------------------------------------------------------
+drkns 2024-05-29 17:32:47+01:00 - build 6337
+
+1. Continue 6336.
+
--------------------------------------------------------------------------------
drkns 2024-05-27 00:33:52+01:00 - build 6336

diff --git a/far/hotplug.cpp b/far/hotplug.cpp
index 666330d67..ba1e96fb0 100644
--- a/far/hotplug.cpp
+++ b/far/hotplug.cpp
@@ -492,7 +492,7 @@ bool RemoveHotplugDrive(string_view const Path, bool const Confirm, bool& Cancel
}

const auto PathType = ParsePath(Path);
- if (PathType != root_type::win32nt_drive_letter && PathType != root_type::volume)
+ if (none_of(PathType, root_type::drive_letter, root_type::win32nt_drive_letter, root_type::volume))
{
Cancelled = true;
return false;
@@ -503,9 +503,9 @@ bool RemoveHotplugDrive(string_view const Path, bool const Confirm, bool& Cancel

const auto ItemIterator = [&]
{
- if (PathType == root_type::win32nt_drive_letter)
+ if (any_of(PathType, root_type::drive_letter, root_type::win32nt_drive_letter))
{
- const auto DiskNumber = os::fs::drive::get_number(Path[L"\\\\?\\"sv.size()]);
+ const auto DiskNumber = os::fs::drive::get_number(Path[PathType == root_type::drive_letter? 0 : L"\\\\?\\"sv.size()]);
return std::ranges::find_if(Info, [&](DeviceInfo const& i){ return i.DevicePaths.Disks[DiskNumber]; });
}

diff --git a/far/vbuild.m4 b/far/vbuild.m4
index b9348c0de..5696aeb61 100644
--- a/far/vbuild.m4
+++ b/far/vbuild.m4
@@ -1 +1 @@
-6336
+6337


Reply all
Reply to author
Forward
0 new messages