FIX: ExcludeBackPathDelimiter with drive root

(cherry picked from commit ff2732ac56)
This commit is contained in:
Alexander Koblov 2022-06-17 19:20:55 +03:00
commit ae0e12fac0

View file

@ -766,7 +766,7 @@ var
L: Integer;
begin
L:= Length(Path);
if (L > 1) and (Path[L] in AllowDirectorySeparators) then
if (L > 1) and (Path[L] in AllowDirectorySeparators) and (Path[L - 1] <> DriveSeparator) then
Result:= Copy(Path, 1, L - 1)
else
Result:= Path;