FIX: HTTP Browser plugin compatibility

This commit is contained in:
Alexander Koblov 2023-12-03 14:12:18 +03:00
commit 93f57286d3

View file

@ -59,6 +59,7 @@ uses
procedure ChooseFile(aFileView: TFileView; aFileSource: IFileSource;
aFile: TFile);
var
Index, PathIndex: Integer;
sCmd, sParams, sStartPath: String;
Operation: TFileSourceExecuteOperation = nil;
aFileCopy: TFile = nil;
@ -134,7 +135,9 @@ begin
with aFileView do
begin
// If path is URI
if Pos('://', Operation.ResultString) > 0 then
Index:= Pos('://', Operation.ResultString);
PathIndex:= Pos(PathDelim, Operation.ResultString);
if (Index > 0) and ((PathIndex > Index) or (PathIndex = 0)) then
ChooseFileSource(aFileView, Operation.ResultString)
else if (FileSource.IsClass(TFileSystemFileSource)) or
(mbSetCurrentDir(ExcludeTrailingPathDelimiter(Operation.ResultString)) = False) then