Permalink
Browse files

Fix: Don't crash on 'tj3man -m' command

  • Loading branch information...
1 parent 8c208ee commit 83e251bc86bb09de93e0ca0f35a694260099ed5f @scrapper scrapper committed Jun 27, 2013
@@ -688,7 +688,8 @@ def generateHTMLExampleBox
return nil if @pattern.supportLevel == :removed
if @pattern.exampleFile
- exampleDir = AppConfig.dataDirs('test')[0] + "TestSuite/Syntax/Correct/"
+ exampleDir = File.join(AppConfig.dataDirs('test')[0], 'TestSuite',
+ 'Syntax', 'Correct')
example = TjpExample.new
fileName = "#{exampleDir}/#{@pattern.exampleFile}.tjp"
example.open(fileName)
@@ -40,8 +40,8 @@ def to_html(args)
tag = args['tag']
example = TjpExample.new
- fileName = AppConfig.dataDirs('test')[0] +
- "TestSuite/Syntax/Correct/#{file}.tjp"
+ fileName = File.join(AppConfig.dataDirs('test')[0], 'TestSuite',
+ 'Syntax', 'Correct', "#{file}.tjp")
example.open(fileName)
frame = XMLElement.new('div', 'class' => 'codeframe')
frame << (pre = XMLElement.new('pre', 'class' => 'code'))
@@ -162,6 +162,8 @@ def main(argv = ARGV)
"#{'*' * 79}\nYou have triggered a bug in " +
"#{AppConfig.softwareName} version #{AppConfig.version}!\n" +
"Please see the user manual on how to get this bug fixed!\n" +
+ "http://www.taskjuggler.org/tj3/manual/Reporting_Bugs.html#" +
+ "Reporting_Bugs_and_Feature_Requests\n" +
"#{'*' * 79}\n")
end
end
@@ -60,7 +60,7 @@ def generate(directory)
TaskJuggler_Internals
fdl
).each do |file|
- snip = addSnip(srcDir + file)
+ snip = addSnip(File.join(srcDir, file))
snip.cssClass = 'manual'
end
# Generate the table of contents
@@ -30,7 +30,7 @@ def initialize
@manual = false
@showHtml = false
@browser = ENV['BROWSER'] || 'firefox'
- @directory = nil
+ @directory = './'
@mininumRubyVersion = '1.8.7'
end

0 comments on commit 83e251b

Please sign in to comment.