mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Error when can not read/write file description
This commit is contained in:
parent
eeca5a3395
commit
77556c55ee
1 changed files with 15 additions and 7 deletions
|
|
@ -120,12 +120,15 @@ var
|
|||
begin
|
||||
sDescrFile:= ExtractFilePath(FileName) + 'descript.ion';
|
||||
if sDescrFile <> FLastDescrFile then
|
||||
begin
|
||||
try
|
||||
if (FLastDescrFile <> '') and (Count > 0) then
|
||||
SaveToFile(FLastDescrFile);
|
||||
FLastDescrFile:= sDescrFile;
|
||||
if mbFileExists(FLastDescrFile) then
|
||||
LoadFromFile(FLastDescrFile);
|
||||
except
|
||||
on E: Exception do
|
||||
DebugLn('TDescription.PrepareDescrFile - ' + E.Message);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
@ -287,12 +290,17 @@ end;
|
|||
|
||||
procedure TDescription.SaveDescription;
|
||||
begin
|
||||
if Count > 0 then
|
||||
SaveToFile(FLastDescrFile)
|
||||
else
|
||||
mbDeleteFile(FLastDescrFile);
|
||||
if Assigned(FDestDescr) then
|
||||
FDestDescr.SaveDescription;
|
||||
try
|
||||
if Count > 0 then
|
||||
SaveToFile(FLastDescrFile)
|
||||
else
|
||||
mbDeleteFile(FLastDescrFile);
|
||||
if Assigned(FDestDescr) then
|
||||
FDestDescr.SaveDescription;
|
||||
except
|
||||
on E: Exception do
|
||||
DebugLn('TDescription.SaveDescription - ' + E.Message);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue