We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5bd218 commit 8325ed7Copy full SHA for 8325ed7
lib/docs/core/scrapers/file_scraper.rb
@@ -29,7 +29,7 @@ def assert_source_directory_exists
29
30
def request_one(url)
31
assert_source_directory_exists
32
- Response.new read_file(url_to_path(url)), URL.parse(url)
+ Response.new read_file(File.join(source_directory, url_to_path(url))), URL.parse(url)
33
end
34
35
def request_all(urls)
@@ -50,7 +50,7 @@ def url_to_path(url)
50
51
52
def read_file(path)
53
- File.read(File.join(source_directory, path))
+ File.read(path)
54
rescue
55
instrument 'warn.doc', msg: "Failed to open file: #{path}"
56
nil
0 commit comments