LCL/ShellTreeView: Fix incorrect behavior of TShellTreeView after propagating node renaming to the file system. Issue #39629.

This commit is contained in:
wp_xyz 2022-02-04 10:50:42 +01:00
parent 61ad4be039
commit 931246668e

View File

@ -439,17 +439,16 @@ end;
function TShellTreeNode.ShortFilename: String; function TShellTreeNode.ShortFilename: String;
begin begin
Result := ExtractFileName(FFileInfo.Name); Result := Text;
if (Result = '') then Result := FFileInfo.Name;
end; end;
function TShellTreeNode.FullFilename: String; function TShellTreeNode.FullFilename: String;
begin begin
if (FBasePath <> '') then if (FBasePath <> '') then
Result := AppendPathDelim(FBasePath) + FFileInfo.Name Result := AppendPathDelim(FBasePath) + Text
else else
//root nodes //root nodes
Result := FFileInfo.Name; Result := Text;
{$if defined(windows) and not defined(wince)} {$if defined(windows) and not defined(wince)}
if (Length(Result) = 2) and (Result[2] = DriveSeparator) then if (Length(Result) = 2) and (Result[2] = DriveSeparator) then
Result := Result + PathDelim; Result := Result + PathDelim;