[Lazarus] ShellTreeView/ShellListView and Root

Bart bartjunk64 at gmail.com
Mon Apr 8 18:33:15 CEST 2013


On 4/8/13, Felipe Monteiro de Carvalho
<felipemonteiro.carvalho at gmail.com> wrote:


> I was planning on reviewing it today. I don't like this chunk:
>
> @@ -631,7 +641,6 @@
>  begin
>    // avoids crashes in the IDE by not populating during design
>    if (csDesigning in ComponentState) then Exit;
> -
>    r := GetLogicalDriveStrings(SizeOf(Drives), Drives);
>    if r = 0 then Exit;
>    if r > SizeOf(Drives) then Exit;
>
>
> The empty line marks the region for which the comment is valid,
?? I don't un derstand what you mean by that last line. Anyhow it has
been there before I started playing with it.


> Also:
>
> +  if not FilenameIsAbsolute(Result) then
> +    Result := GetRootPath() + Result;    // Include root directory
>
> I think this is redundant, this entire part could be deleted I think.

Without it, it didn't work at some time.
I'll re-test, because since I put that one in, I've changed some more.

Bart




More information about the Lazarus mailing list