diff --git a/buildstream/_frontend/complete.py b/buildstream/_frontend/complete.py
index 79bb9275832e974d938669d86ced37bd868421ce..97d6d45ec3dc3af31029f9d3ef87729472a94026 100644
--- a/buildstream/_frontend/complete.py
+++ b/buildstream/_frontend/complete.py
@@ -68,9 +68,10 @@ def complete_path(path_type, incomplete, base_directory='.'):
         # If there was nothing on the left of the last separator,
         # we are completing files in the filesystem root
         base_path = os.path.join(base_directory, base_path)
-
-    elif os.path.isdir(incomplete):
-        base_path = incomplete
+    else:
+        incomplete_base_path = os.path.join(base_directory, incomplete)
+        if os.path.isdir(incomplete_base_path):
+            base_path = incomplete_base_path
 
     try:
         if base_path:
diff --git a/tests/completions/completions.py b/tests/completions/completions.py
index 1ff026ea586c13344b3d22c6aab7e56c5cdfbd74..50b41f7b30446d3e94a76bc5153a8b90feaadb8c 100644
--- a/tests/completions/completions.py
+++ b/tests/completions/completions.py
@@ -212,6 +212,10 @@ def test_option_directory(datafiles, cli, cmd, word_idx, expected, subdir):
     # Also try multi arguments together
     ('no-element-path', 'bst --directory ../ checkout t ', 4, ['target.bst '], 'files'),
     ('no-element-path', 'bst --directory ../ checkout target.bst ', 5, ['bin-files/', 'dev-files/'], 'files'),
+
+    # When element-path have sub-folders
+    ('sub-folders', 'bst show base', 2, ['base/wanted.bst '], None),
+    ('sub-folders', 'bst show base/', 2, ['base/wanted.bst '], None),
 ])
 def test_argument_element(datafiles, cli, project, cmd, word_idx, expected, subdir):
     cwd = os.path.join(str(datafiles), project)
diff --git a/tests/completions/sub-folders/base/unwanted.bst b/tests/completions/sub-folders/base/unwanted.bst
new file mode 100644
index 0000000000000000000000000000000000000000..bd510513d4410f7653dd25b3ea885454669e4303
--- /dev/null
+++ b/tests/completions/sub-folders/base/unwanted.bst
@@ -0,0 +1,4 @@
+kind: autotools
+description: |
+
+    Not auto-completed element
diff --git a/tests/completions/sub-folders/elements/base.bst b/tests/completions/sub-folders/elements/base.bst
new file mode 100644
index 0000000000000000000000000000000000000000..4e97e8ac04ea2c86bdffb93f0d8c6e126e6ab68d
--- /dev/null
+++ b/tests/completions/sub-folders/elements/base.bst
@@ -0,0 +1,5 @@
+kind: stack
+description: Base stack
+
+depends:
+- base/wanted.bst
diff --git a/tests/completions/sub-folders/elements/base/wanted.bst b/tests/completions/sub-folders/elements/base/wanted.bst
new file mode 100644
index 0000000000000000000000000000000000000000..57656210d31e9ec31ad102b0f7e0c6b41fcd5b71
--- /dev/null
+++ b/tests/completions/sub-folders/elements/base/wanted.bst
@@ -0,0 +1,4 @@
+kind: autotools
+description: |
+
+    Auto-completed element
diff --git a/tests/completions/sub-folders/elements/hello.bst b/tests/completions/sub-folders/elements/hello.bst
new file mode 100644
index 0000000000000000000000000000000000000000..93fcaa04bc617bf3fdb716d5e10dfa5af557c9f9
--- /dev/null
+++ b/tests/completions/sub-folders/elements/hello.bst
@@ -0,0 +1,4 @@
+kind: autotools
+description: |
+
+    Hello world
diff --git a/tests/completions/sub-folders/project.conf b/tests/completions/sub-folders/project.conf
new file mode 100644
index 0000000000000000000000000000000000000000..854e38693f391e65b8f9af10ee35679e4907ccb0
--- /dev/null
+++ b/tests/completions/sub-folders/project.conf
@@ -0,0 +1,4 @@
+# Project config for frontend build test
+name: test
+
+element-path: elements