From b5f3d902f1006e76c1ae60c131646daaa5644b34 Mon Sep 17 00:00:00 2001 From: VVSiz Date: Sat, 16 Apr 2011 10:20:32 +0200 Subject: [PATCH] Print out only warning when the end files already exist --- dsl2txt.rb | 4 ++-- lib/TxtDictionary.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dsl2txt.rb b/dsl2txt.rb index 5576f2b..cdea1c5 100644 --- a/dsl2txt.rb +++ b/dsl2txt.rb @@ -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) diff --git a/lib/TxtDictionary.rb b/lib/TxtDictionary.rb index e533072..67ac9fd 100644 --- a/lib/TxtDictionary.rb +++ b/lib/TxtDictionary.rb @@ -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