diff options
Diffstat (limited to 'path.c')
-rw-r--r-- | path.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -728,3 +728,10 @@ int daemon_avoid_alias(const char *p) } } } + +int offset_1st_component(const char *path) +{ + if (has_dos_drive_prefix(path)) + return 2 + is_dir_sep(path[2]); + return is_dir_sep(path[0]); +} |