Repository: dynaconf/dynaconf

Issue:
[bug] Includes parameter not working
**Describe the bug**
The `includes` parameter is not loading the files properly 

**To Reproduce**
Steps to reproduce the behavior:

1. Having the following folder structure
```
├── conf
│   ├── database
│   │   └── postgre.toml
│   └── settings.toml
└── config.py
```
2. Having the following config file
```python
# config.py
from dynaconf import Dynaconf

settings = Dynaconf(
    envvar_prefix="DYNACONF",
    settings_files=['conf/settings.toml',
                    'conf/.secrets.toml'],
    includes=['conf/**/*.toml']
)
```
3. Run `dynaconf -i config.settings list` and the parameters inside conf/database/postgre.toml are not showed.
```
Working in main environment 
A<int> 3
B<int> 2
```

4. Having the folling `.toml` files 

```toml
# conf/settings.toml
a=3
b=2
```
```toml
# conf/database/postgre.toml
included_host="0.0.0.0"
```


**Expected behavior**
Output:
```
Working in main environment 
A<int> 3
B<int> 2
INCLUDED_HOST<str> "0.0.0.0"
```

**Environment (please complete the following information):**
 - OS: OS: Pop!_OS 22.04 LTS x86_64
 - Dynaconf Version 3.1.9



Discussion:

Resolving patch:
diff --git a/dynaconf/base.py b/dynaconf/base.py
--- a/dynaconf/base.py
+++ b/dynaconf/base.py
@@ -1074,18 +1074,16 @@ def load_file(self, path=None, env=None, silent=True, key=None):
                     # continue the loop.
                     continue
 
-                # python 3.6 does not resolve Pathlib basedirs
-                # issue #494
                 root_dir = str(self._root_path or os.getcwd())
+
+                # Issue #494
                 if (
                     isinstance(_filename, Path)
                     and str(_filename.parent) in root_dir
                 ):  # pragma: no cover
                     filepath = str(_filename)
                 else:
-                    filepath = os.path.join(
-                        self._root_path or os.getcwd(), str(_filename)
-                    )
+                    filepath = os.path.join(root_dir, str(_filename))
 
                 paths = [
                     p
@@ -1095,6 +1093,7 @@ def load_file(self, path=None, env=None, silent=True, key=None):
                 local_paths = [
                     p for p in sorted(glob.glob(filepath)) if ".local." in p
                 ]
+
                 # Handle possible *.globs sorted alphanumeric
                 for path in paths + local_paths:
                     if path in already_loaded:  # pragma: no cover
diff --git a/example/issues/794_includes/app.py b/example/issues/794_includes/app.py
new file mode 100644
--- /dev/null
+++ b/example/issues/794_includes/app.py
@@ -0,0 +1,36 @@
+from __future__ import annotations
+
+import os
+
+from dynaconf import Dynaconf
+
+# ISSUE 794
+# WHEN USING INCLUDES
+# THE INCLUDES ARE LOADED RELATIVE TO
+# THE FIRST LOADED FILE `conf/settings.toml`
+settings = Dynaconf(
+    settings_files=["conf/settings.toml", "conf/.secrets.toml"],
+    includes=["**/*.toml"],
+)
+
+assert settings.a == 3
+assert settings.b == 2
+assert settings.included_host == "0.0.0.0"
+
+
+# SO..
+# WHEN USING INCLUDES IT IS RECOMMENDED
+# TO SET THE ROOT PATH TO THE DIRECTORY
+# WHERE THE SCRIPT IS RUNNING
+# OR PASS AN ABSOLUTE PATH TO THE root_path or includes
+
+HERE = os.path.dirname(os.path.abspath(__file__))
+settings_with_root_path = Dynaconf(
+    root_path=HERE,
+    settings_files=["conf/settings.toml", "conf/.secrets.toml"],
+    includes=["conf/**/*.toml"],
+)
+
+assert settings_with_root_path.a == 3
+assert settings_with_root_path.b == 2
+assert settings_with_root_path.included_host == "0.0.0.0"


Test patch: