Skip to content

Commit

Permalink
Print out only warning when the end files already exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Tvangeste committed Apr 16, 2011
1 parent 0f596ad commit b5f3d90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dsl2txt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
end

if File.exist?($OUT)
$stderr.puts "ERROR: Output directory already exist: '#{$OUT}'"
exit
$stderr.puts "WARNING: Output directory already exists: '#{$OUT}'"
# exit
else
$stderr.puts "Creating output directory: '#{$OUT}'"
Dir.mkdir($OUT)
Expand Down
4 changes: 2 additions & 2 deletions lib/TxtDictionary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def add(key, trn)
def extract_to_dir(dir_name)
file = dir_name + "/" + desc_to_filename + ".txt"
if (File.exist?(file))
$stderr.puts "ERROR: file already exist: '#{file}'"
exit
$stderr.puts "WARNING: file already exists (will overwrite): '#{file}'"
# exit
end
print_out(file)
end
Expand Down

0 comments on commit b5f3d90

Please sign in to comment.