Skip to content

Commit

Permalink
fix: relative file URL parsing (#1145)
Browse files Browse the repository at this point in the history
  • Loading branch information
zepatrik committed Nov 22, 2022
1 parent d4e5eb8 commit 03cac63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/driver/config/namespace_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func watchTarget(ctx context.Context, target string, handler eventHandler, log *
return errors.WithStack(err)
}
if info.IsDir() {
watcher, err = watcherx.WatchDirectory(ctx, targetUrl.Path, eventCh)
watcher, err = watcherx.WatchDirectory(ctx, urlx.GetURLFilePath(targetUrl), eventCh)
} else {
watcher, err = watcherx.Watch(ctx, targetUrl, eventCh)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/driver/config/opl_config_namespace_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func newOPLConfigWatcher(ctx context.Context, c *Config, target string) (*oplCon
}

switch targetUrl.Scheme {
case "file":
case "file", "":
return nw, watchTarget(ctx, target, nw, c.l)
case "http", "https", "base64":
file, err := c.Fetcher().Fetch(target)
Expand Down

0 comments on commit 03cac63

Please sign in to comment.