diff --git a/lcl/editbtn.pas b/lcl/editbtn.pas index 2ecee3058f..38833741ad 100644 --- a/lcl/editbtn.pas +++ b/lcl/editbtn.pas @@ -1451,7 +1451,10 @@ begin O.Options := DialogOptions; O.Filter := Filter; O.FilterIndex := FilterIndex; - O.InitialDir := CleanAndExpandDirectory(InitialDir); + if (InitialDir <> '') then //don't force currentdir here, let WS do it's normal "magic" to decide where to open + O.InitialDir := CleanAndExpandDirectory(InitialDir) + else + O.InitialDir := ''; end; // Set some common things. Result.Title := DialogTitle;