Handle lack of a Documents directory
This commit is contained in:
parent
048050c980
commit
1ba7bebce6
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue