diff --git a/src/u_ceproject.pas b/src/u_ceproject.pas index ce3e5f4a..c1aec3c9 100644 --- a/src/u_ceproject.pas +++ b/src/u_ceproject.pas @@ -271,14 +271,14 @@ begin f := fname; if not FilenameIsAbsolute(f) then f := ExpandFileName(f); - if fname.extractFileExt <> '.dprj' then + fbasePath := f.extractFilePath; + inherited customLoadFromFile(f); + if hasLoaded and (fname.extractFileExt <> '.dprj') then begin dlgOkInfo('project file extension automatically updated to "dprj"'); f := ChangeFileExt(fname, '.dprj'); RenameFile(fname, f); end; - fbasePath := f.extractFilePath; - inherited customLoadFromFile(f); end; procedure TNativeProject.customSaveToFile(const fname: string); diff --git a/src/u_projgroup.pas b/src/u_projgroup.pas index 898a5ee2..f00a490a 100644 --- a/src/u_projgroup.pas +++ b/src/u_projgroup.pas @@ -393,14 +393,14 @@ begin f := fname; if not FilenameIsAbsolute(f) then f := ExpandFileName(f); - if fname.extractFileExt <> '.dgrp' then + fBasePath := f.extractFilePath; + loadFromFile(f); + if hasLoaded and (fname.extractFileExt <> '.dgrp') then begin dlgOkInfo('project file extension automatically updated to "dgrp"'); f := ChangeFileExt(fname, '.dgrp'); RenameFile(fname, f); end; - fBasePath := f.extractFilePath; - loadFromFile(f); for i:= 0 to fItems.Count-1 do getItem(i).fGroup := self; doChanged;