[devdocsgjs/main: 663/1867] Fix OpenJDK scraper
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 663/1867] Fix OpenJDK scraper
- Date: Fri, 19 Nov 2021 23:47:23 +0000 (UTC)
commit 8325ed78ef6fffd79bfa3ad1c5d9fc0053184958
Author: Jasper van Merle <jaspervmerle gmail com>
Date: Wed Jul 17 21:51:39 2019 +0200
Fix OpenJDK scraper
lib/docs/core/scrapers/file_scraper.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/docs/core/scrapers/file_scraper.rb b/lib/docs/core/scrapers/file_scraper.rb
index 9d354631..72a99b99 100644
--- a/lib/docs/core/scrapers/file_scraper.rb
+++ b/lib/docs/core/scrapers/file_scraper.rb
@@ -29,7 +29,7 @@ module Docs
def request_one(url)
assert_source_directory_exists
- 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)
end
def request_all(urls)
@@ -50,7 +50,7 @@ module Docs
end
def read_file(path)
- File.read(File.join(source_directory, path))
+ File.read(path)
rescue
instrument 'warn.doc', msg: "Failed to open file: #{path}"
nil
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]