From 3e5c331236c7c948c5c0b757c454554917d1474f Mon Sep 17 00:00:00 2001 From: mattias Date: Sat, 5 Nov 2011 08:38:49 +0000 Subject: [PATCH] IDE: DoOpenEditorFile: do not open directories git-svn-id: trunk@33324 - --- ide/main.pp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ide/main.pp b/ide/main.pp index 8799733e4c..e306c6c50c 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -9271,6 +9271,11 @@ begin // check if symlink and ask user open the real file instead ChooseSymlink(AFilename); + if DirectoryExistsUTF8(AFileName) then begin + debugln(['TMainIDE.DoOpenEditorFile skipping directory ',AFileName]); + exit(mrCancel); + end; + FilenameNoPath:=ExtractFilename(AFilename); // check to not open directories