Problem with folderitem.parent

Hello,
LR of both Xojo19r1.1 and 19.r2, for folderitem > Parent say that if the parent is the root, then the parent is nil.

Untill Xojo2019r1.1, if the folderitem to be parsed was a volume (disk, flashdrive etc.) I could detect it with
if f.parent = nil then
//it is a volume, disk, flashdrive etc.
end if

Now, opening the same old project with Xojo2019r2, parsing a volume (disk or flashdrive) f.parent is NOT nil, and the owner of f.parent is “root”.

In order to keep the same project working in both releases, at present I use this code:
if f.Parent = nil or f.Parent.Owner = “root” then
//it is a disk or a flashdrive etc.
end if

Is there a better way to solve the issue in pure Xojo or through declares?

Suggestions welcome. Thanks.

Thanks for the hint.

You are welcome.

Yet I’d like to know, (by Xojo) if this is the expected behavior or not, and if necessary to modify the docs of r2.

Edited:
meanwhile I changed the approach:

if f.isDisk then
//do something
else
//do something else
end if

Public Function isDisk(extends f as FolderItem) as Boolean #if XojoVersion >= 2019.02 Return f.Parent.Parent.Parent = nil #else Return f.Parent = nil #EndIf End Function