TTreeVerify.Create turns its base directories into FBaseLeftBS := itpd(_BaseLeft) and FBaseRightBS := itpd(_BaseRight). itpd (IncludeTrailingPathDelimiter) turns '' into '\' and the drive relative 'c:' into 'c:\'. So TTreeVerify.Create('', 'd:\backup') compares the root of the current drive instead of the current directory, and Create('c:', ...) compares c:\ instead of the current directory of drive c:. A relative base like 'src' works, because itpd('src') is 'src\'.
Found by reading the code in a review of [bugs:#98], which had the same cause in TSimpleDirEnumerator.Execute. Not reproduced. It only matters if a caller passes such a base, which seems unlikely.
Possible fixes: keep '' and 'x:' as they are and append the subdirectories without a backslash (as #98 did with ExtractFilePath), expand the bases with ExpandFileName in the constructor, or reject them with an exception.
Fixed in revision [r2544].
Related
Commit: [r2544]