MKDIR issue
Posted: Friday 21st December 2018 6:16am
Has something changed in the past few Gambas releases? I used to be able to create a nested directory structure to store app data. The last app I created was 2 about years ago (using Gambas 3.8.x) and it worked fine. I've recently updated to 3.11.4 on both my openSUSE and Debian boxes and I'm finding MKDIR isn't working like it used to on either box.
I can create the first level directory, but when trying to create a directory inside I get an "access forbidden" error.
Testing code:
This is the actual block of code used in many of my apps that worked without issue:
I can create the first level directory, but when trying to create a directory inside I get an "access forbidden" error.
Testing code:
Code: Select all
Public Sub Form_Open()
If Not Exist(User.Home &/ "Test") Then Mkdir (User.Home &/ "Test")
If Not Exist("Test/Test1") Then Mkdir ("Test/Test1")
End
Code: Select all
Public Sub CheckDirIntegrity()
If Not Exist(User.Home &/ Mglobal.sBaseDir) Then Mkdir (User.Home &/ Mglobal.sBaseDir) ' check for base directory
If Not Exist(Mglobal.sAppDirPath) Then Mkdir (Mglobal.sAppDirPath) ' check for application directory
If Not Exist(Mglobal.sConfigPath) Then Mkdir (Mglobal.sConfigPath) ' check for configuration directory
If Not Exist(Mglobal.sDataPath) Then Mkdir (Mglobal.sDataPath) ' check for data directory
End