mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Bug [0001190] Drive buttons behave wrong when one drive's label is a substring of other drive's label
This commit is contained in:
parent
1f18a5fcb7
commit
8069bdfc98
1 changed files with 4 additions and 2 deletions
|
|
@ -5383,6 +5383,7 @@ procedure TfrmMain.SetPanelDrive(aPanel: TFilePanelSelect; Drive: PDrive; Activa
|
|||
var
|
||||
Index: Integer;
|
||||
DrivePath: String;
|
||||
HistoryPath: String;
|
||||
FoundPath: Boolean = False;
|
||||
aFileView, OtherFileView: TFileView;
|
||||
begin
|
||||
|
|
@ -5423,10 +5424,11 @@ begin
|
|||
else if (gGoToRoot = False) and aFileView.FileSource.IsClass(TFileSystemFileSource) and
|
||||
not mbCompareFileNames(ExtractRootDir(aFileView.CurrentPath), ExcludeTrailingPathDelimiter(Drive^.Path)) then
|
||||
begin
|
||||
DrivePath:= IncludeTrailingPathDelimiter(Drive^.Path);
|
||||
for Index:= 0 to glsDirHistory.Count - 1 do
|
||||
begin
|
||||
DrivePath:= Copy(glsDirHistory[Index], 1, Length(Drive^.Path));
|
||||
if mbCompareFileNames(DrivePath, Drive^.Path) then
|
||||
HistoryPath:= Copy(glsDirHistory[Index], 1, Length(DrivePath));
|
||||
if mbCompareFileNames(HistoryPath, DrivePath) then
|
||||
begin
|
||||
if mbDirectoryExists(ExcludeBackPathDelimiter(glsDirHistory[Index])) then
|
||||
begin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue