aboutsummaryrefslogtreecommitdiff
path: root/src/port/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/port/path.c')
-rw-r--r--src/port/path.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/port/path.c b/src/port/path.c
index 6991bc7247b..13ca4f3f1c1 100644
--- a/src/port/path.c
+++ b/src/port/path.c
@@ -75,6 +75,17 @@ skip_drive(const char *path)
#endif
/*
+ * has_drive_prefix
+ *
+ * Return true if the given pathname has a drive prefix.
+ */
+bool
+has_drive_prefix(const char *path)
+{
+ return skip_drive(path) != path;
+}
+
+/*
* first_dir_separator
*
* Find the location of the first directory separator, return