diff options
Diffstat (limited to 'lib/sisu/v5/db_select.rb')
-rw-r--r-- | lib/sisu/v5/db_select.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/sisu/v5/db_select.rb b/lib/sisu/v5/db_select.rb index ae87ee1b..997b6a1a 100644 --- a/lib/sisu/v5/db_select.rb +++ b/lib/sisu/v5/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) |