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 fa16792 commit 649e548Copy full SHA for 649e548
lib/rtesseract/base.rb
@@ -10,13 +10,8 @@ def temp_file_path
10
Pathname.new(Dir.tmpdir).join("rtesseract_#{SecureRandom.uuid}").to_s
11
end
12
13
- def remove_tmp_file(output_path)
14
- Dir["#{Dir.tmpdir}/*"].each do |filename|
15
- if filename.include?(output_path)
16
- File.delete(filename)
17
- break
18
- end
19
+ def remove_tmp_file(absolute_file_path)
+ File.delete(absolute_file_path) if File.file?(absolute_file_path)
20
21
22
0 commit comments