Browse Source

DocumentsDir: fixed problem not creating templates directory

tags/1.4
Sven Oliver Moll 6 months ago
parent
commit
e29d546264
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/fridgegrid/DocumentsDir.cpp

+ 3
- 1
src/fridgegrid/DocumentsDir.cpp View File

@@ -27,7 +27,6 @@
DocumentsDir::DocumentsDir()
{
QSettings settings;
QDir templatesDir( getTemplatesDirName() );

if( !settings.contains( SETTINGS_CREATETEMPLATESDIR ) )
{
@@ -35,6 +34,9 @@ DocumentsDir::DocumentsDir()
}
mUseDocDir = settings.value( SETTINGS_CREATETEMPLATESDIR ).toBool();

/* must not be created ealier,
since getTemplateDirName() depends on mUseDocDir */
QDir templatesDir( getTemplatesDirName() );
if( mUseDocDir && !templatesDir.exists() )
{
generateTemplateDir();

Loading…
Cancel
Save