aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/db_select.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v6/db_select.rb')
-rw-r--r--lib/sisu/v6/db_select.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/sisu/v6/db_select.rb b/lib/sisu/v6/db_select.rb
index f7bf7ee0..c9c4ffc1 100644
--- a/lib/sisu/v6/db_select.rb
+++ b/lib/sisu/v6/db_select.rb
@@ -182,12 +182,16 @@ module SiSU_DbSelect
file=if @opt.act[:maintenance][:set]==:on
if @opt.fns and not @opt.fns.empty?
@env=SiSU_Env::InfoEnv.new(@opt.fns) if @opt.fns
- if @sql_type ==:sqlite and @opt.act[:maintenance][:set]==:on
+ if @sql_type ==:sqlite
puts "\n#{@env.processing_path.sqlite}/#{@opt.fns}.sql"
end
@db=SiSU_Env::InfoDb.new
@job="sqlite3 #{@db.sqlite.db} < #{@env.processing_path.sqlite}/#{@opt.fns}.sql"
- File.new("#{@env.processing_path.sqlite}/#{@opt.fns}.sql",'w+')
+ if @sql_type ==:sqlite
+ File.new("#{@env.processing_path.sqlite}/#{@opt.fns}.sql",'w+')
+ else
+ File.new("#{@env.processing_path.postgresql}/#{@opt.fns}.sql",'w+')
+ end
elsif @opt.fns \
and (@opt.act[:sqlite_create][:set] ==:on \
|| @opt.act[:psql_create][:set] ==:on)