mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Exception if file "user-dirs.dirs" does not exists
This commit is contained in:
parent
4cc1f238ea
commit
b752ead75f
1 changed files with 3 additions and 1 deletions
|
|
@ -77,8 +77,10 @@ begin
|
|||
Result:= False;
|
||||
try
|
||||
Items:= nil;
|
||||
templateDir:= GetHomeDir + '.config/user-dirs.dirs';
|
||||
if not mbFileExists(templateDir) then Exit;
|
||||
userDirs:= TStringList.Create;
|
||||
userDirs.LoadFromFile(GetHomeDir + '.config/user-dirs.dirs');
|
||||
userDirs.LoadFromFile(templateDir);
|
||||
templateDir:= userDirs.Values['XDG_TEMPLATES_DIR'];
|
||||
if Length(templateDir) = 0 then Exit;
|
||||
templateDir:= IncludeTrailingPathDelimiter(mbExpandFileName(TrimQuotes(templateDir)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue