mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
Merge 447f4c465a into eb40609250
This commit is contained in:
commit
09d5fcf012
2 changed files with 11 additions and 5 deletions
|
|
@ -6366,14 +6366,17 @@ procedure TfrmMain.LoadTabsCommandLine(Params: TCommandLineParams);
|
|||
if Length(aPath) <> 0 then
|
||||
begin
|
||||
aPath:= ReplaceEnvVars(ReplaceTilde(aPath));
|
||||
if not mbFileSystemEntryExists(aPath) then
|
||||
if not mbFileSystemEntryExists(aPath) and not aPath.StartsWith('wfx://') then
|
||||
aPath:= GetDeepestExistingPath(aPath);
|
||||
if Length(aPath) <> 0 then
|
||||
begin
|
||||
if Params.NewTab then
|
||||
AddTab(aNoteBook, aPath)
|
||||
else
|
||||
aNoteBook.ActivePage.FileView.ChangePathAndSetActiveFile(aPath)
|
||||
if aPath.StartsWith('wfx://') then
|
||||
Commands.cm_ChangeDir([aPath])
|
||||
else
|
||||
aNoteBook.ActivePage.FileView.ChangePathAndSetActiveFile(aPath);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -31,11 +31,14 @@ uses
|
|||
function DecodePath(const Path: String): String;
|
||||
begin
|
||||
Result := TrimQuotes(Path);
|
||||
if Pos(fileScheme, Result) = 1 then
|
||||
if not Result.StartsWith('wfx://') then
|
||||
begin
|
||||
Result:= URIDecode(Copy(Result, 8, MaxInt));
|
||||
if Pos(fileScheme, Result) = 1 then
|
||||
begin
|
||||
Result:= URIDecode(Copy(Result, 8, MaxInt));
|
||||
end;
|
||||
Result:= GetAbsoluteFileName(IncludeTrailingBackslash(GetCurrentDir), Result);
|
||||
end;
|
||||
Result:= GetAbsoluteFileName(IncludeTrailingBackslash(GetCurrentDir), Result);
|
||||
end;
|
||||
|
||||
procedure ProcessCommandLineParams;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue