Skip to content

Commit 36095d3

Browse files
kenhysWatson1978
andauthored
Backport(v1.16): parser: fix file path into URI#open for Windows (#4855) (#4926)
**Which issue(s) this PR fixes**: Backport #4855 Fixes # **What this PR does / why we need it**: This patch will fix the problem in #4848 `u.path` has the file path without a drive letter in Windows environment. If Fluentd is worked on `c` drive and config file exists in `d` drive, it can't parse config file, I think. **Docs Changes**: **Release Note**: Signed-off-by: Shizuo Fujita <[email protected]> Signed-off-by: Kentaro Hayashi <[email protected]> Co-authored-by: Shizuo Fujita <[email protected]>
1 parent bd34eaf commit 36095d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/fluent/config/parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def process_include(attrs, elems, uri, allow_include = true)
107107
# - uri is 'c:/path/to/file'
108108
# - u.path is '/path/to/file' and u.scheme is 'c'
109109
# Therefore, the condition of the if statement above is not met and it is handled here.
110-
File.open(u.path, &parser_proc)
110+
File.open(uri, &parser_proc)
111111
end
112112
end
113113

0 commit comments

Comments
 (0)