[DEVELOPMENT ENVIRONMENT]

* BUG: Don't crash when installing the Gambas font, if the 
  '~/.config/fontconfig' directory does not exist.


git-svn-id: svn://localhost/gambas/trunk@6572 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2014-10-25 00:51:31 +00:00
parent c8fdb28610
commit 77dd6cea1e
2 changed files with 3 additions and 0 deletions

View file

@ -1129,6 +1129,7 @@ Public Sub btnInstallFont_Click()
Try Copy "font" &/ sFont To sDir &/ sFont
Next
Project.MakeDir("~/.config/fontconfig")
sConf = "~/.config/fontconfig/fonts.conf"
'If Not Exist(sConf) Then sConf = "~/.config/fontconfig/.fonts.conf"

View file

@ -2806,6 +2806,8 @@ Public Sub MakeDir(sDir As String) As Boolean
Dim sPath As String
Dim sElt As String
If sDir Begins "~/" Then sDir = User.Home &/ Mid$(sDir, 3)
For Each sElt In Split(sDir, "/")
sPath &/= sElt
Try Mkdir "/" & sPath