mirror of https://gitlab.com/basile.b/dexed.git
fix #396 - Drag drop of unknow ext file cause a rename to `.dprj`
This commit is contained in:
parent
a3efb52aa6
commit
bd93137646
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue