Do not crash if the layout user directory does not exist yet.
[DEVELOPMENT ENVIRONMENT] * BUG: Do not crash if the layout user directory does not exist yet.
This commit is contained in:
parent
902fd4aae2
commit
b7a7393b1a
1 changed files with 8 additions and 6 deletions
|
@ -1661,12 +1661,14 @@ Private Sub RefreshLayout()
|
|||
$aLayout.Add(Html(sName))
|
||||
Next
|
||||
|
||||
For Each sFile In Dir(sDir, "*.layout").Sort(gb.Natural)
|
||||
sName = File.BaseName(sFile)
|
||||
$aLayout.Add(sName)
|
||||
If $cLayoutName.Exist(sName) Then sName = $cLayoutName[sName]
|
||||
$aLayout.Add(Html(sName))
|
||||
Next
|
||||
If IsDir(sDir) Then
|
||||
For Each sFile In Dir(sDir, "*.layout").Sort(gb.Natural)
|
||||
sName = File.BaseName(sFile)
|
||||
$aLayout.Add(sName)
|
||||
If $cLayoutName.Exist(sName) Then sName = $cLayoutName[sName]
|
||||
$aLayout.Add(Html(sName))
|
||||
Next
|
||||
Endif
|
||||
|
||||
gvwLayout.Rows.Count = $aLayout.Count \ 2
|
||||
|
||||
|
|
Loading…
Reference in a new issue