Skip to content

Commit

Permalink
UPD: Check file name on the local file system only (fixes #709)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexx2000 committed Jan 15, 2023
1 parent 85a0864 commit 28ea809
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/fileviews/ufileviewheader.pas
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ implementation
uses
LCLType, ShellCtrls, Graphics, uDCUtils, DCOSUtils, DCStrUtils, uKeyboard,
fMain, uFileSourceUtil, uGlobs, uPixMapManager, uLng, uFileFunctions,
uArchiveFileSource, uFileViewWithPanels;
uArchiveFileSource, uFileViewWithPanels, uVfsModule;

const
SortingImageIndex: array[TSortDirection] of Integer = (-1, 0, 1);
Expand All @@ -101,6 +101,7 @@ procedure TFileViewHeader.PathEditKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var
NewPath: String;
AClass: TFileSourceClass;
begin
case Key of
VK_ESCAPE:
Expand All @@ -116,7 +117,9 @@ procedure TFileViewHeader.PathEditKeyDown(Sender: TObject; var Key: Word;
Key := 0; // catch the enter
NewPath:= NormalizePathDelimiters(FPathEdit.Text);
NewPath:= ReplaceEnvVars(ReplaceTilde(NewPath));
if not mbFileExists(NewPath) then
AClass:= gVfsModuleList.GetFileSource(NewPath);
// Check file name on the local file system only
if not ((AClass = nil) and mbFileExists(NewPath)) then
begin
if not ChooseFileSource(FFileView, NewPath, True) then
Exit;
Expand Down

0 comments on commit 28ea809

Please sign in to comment.