aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/coredata.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index e8b23fd..401211a 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -193,6 +193,10 @@ class CoreData:
# string is of type 'C:\' because 'C:' is not an absolute path.
if len(prefix) == 3 and prefix[1] == ':':
pass
+ # If prefix is a single character, preserve it since it is
+ # the root directory.
+ elif len(prefix) == 1:
+ pass
else:
prefix = prefix[:-1]
return prefix