diff --git a/libs/kiplatform/gtk/environment.cpp b/libs/kiplatform/gtk/environment.cpp index cdb204c811..df9c9fdc77 100644 --- a/libs/kiplatform/gtk/environment.cpp +++ b/libs/kiplatform/gtk/environment.cpp @@ -61,6 +61,10 @@ wxString KIPLATFORM::ENV::GetDocumentsPath() fallback.AppendDir( "Documents" ); fallback.MakeAbsolute(); + // No Documents dir and nothing from XDG? Give up and use $HOME + if( !fallback.DirExists() || !fallback.IsDirWritable() ) + fallback.RemoveLastDir(); + docsPath = fallback.GetFullPath(); }