aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bun.js/node/path_watcher.zig13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/bun.js/node/path_watcher.zig b/src/bun.js/node/path_watcher.zig
index 4f44a68ff..e00451a38 100644
--- a/src/bun.js/node/path_watcher.zig
+++ b/src/bun.js/node/path_watcher.zig
@@ -286,17 +286,8 @@ pub const PathWatcherManager = struct {
if (!(path.len == 1 and entry_point[0] == '/')) {
path = path[entry_point.len..];
- if (path.len == 0) {
- while (path.len > 0) {
- if (bun.strings.startsWithChar(path, '/')) {
- path = path[1..];
- break;
- } else {
- path = path[1..];
- }
- }
- } else {
- // Skip forward slash
+ // Skip leading slash
+ if (bun.strings.startsWithChar(path, '/')) {
path = path[1..];
}
}