diff options
author | 2021-07-28 20:56:29 -0700 | |
---|---|---|
committer | 2021-07-28 20:56:29 -0700 | |
commit | 4a8b2546526e97583a2743d17405f664cbf6a16e (patch) | |
tree | 7cfdef87ee13374afc908dd5b0860502036d1c70 /src/fs.zig | |
parent | 86296897e55e0c80a3e93e27031e244525fb757c (diff) | |
download | bun-4a8b2546526e97583a2743d17405f664cbf6a16e.tar.gz bun-4a8b2546526e97583a2743d17405f664cbf6a16e.tar.zst bun-4a8b2546526e97583a2743d17405f664cbf6a16e.zip |
esmodules work?
Former-commit-id: 5cb5af4416c12518eb195d1b310990fc5c94d6c8
Diffstat (limited to 'src/fs.zig')
-rw-r--r-- | src/fs.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fs.zig b/src/fs.zig index a0e6e8f42..ba7eaf32f 100644 --- a/src/fs.zig +++ b/src/fs.zig @@ -885,7 +885,7 @@ pub const PathName = struct { // so if dir does not have a trailing slash, but is spaced one apart from the basename // we can assume there is a trailing slash there // so we extend the original slice's length by one - return this.dir.ptr[0 .. this.dir.len + @intCast( + return if (this.dir.len == 0) "./" else this.dir.ptr[0 .. this.dir.len + @intCast( usize, @boolToInt( this.dir[this.dir.len - 1] != std.fs.path.sep_posix and (@ptrToInt(this.dir.ptr) + this.dir.len + 1) == @ptrToInt(this.base.ptr), |