Skip to content

Commit

Permalink
Fix is_absolute_path for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
syrmel committed Feb 20, 2024
1 parent d93b093 commit 8c98a3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/readlink/readlink.v
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn is_absolute_path(path string) bool {
$if !windows {
return path.starts_with(os.path_separator)
} $else {
return (path.len >= 3 && (path[1] == `:` && path[2] == os.path_separator))
return (path.len >= 3 && (path[1] == `:` && path[2] == os.path_separator[0]))
|| (path.len > 2 && path.starts_with('${os.path_separator}${os.path_separator}'))
}
}
Expand Down

0 comments on commit 8c98a3d

Please sign in to comment.