mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 13:51:47 +00:00
fix: crash in bun init by renaming string function to be more consistant (#7746)
This commit is contained in:
@@ -813,7 +813,7 @@ pub const RunCommand = struct {
|
||||
if (!has_copied) {
|
||||
bun.copy(u8, &path_buf, value.dir);
|
||||
dir_slice = path_buf[0..value.dir.len];
|
||||
if (!strings.endsWithChar(value.dir, std.fs.path.sep)) {
|
||||
if (!strings.endsWithCharOrIsZeroLength(value.dir, std.fs.path.sep)) {
|
||||
dir_slice = path_buf[0 .. value.dir.len + 1];
|
||||
}
|
||||
has_copied = true;
|
||||
|
||||
Reference in New Issue
Block a user