diff options
author | Kevin Mook <kevin@kevinmook.com> | 2013-10-21 13:30:05 -0400 |
---|---|---|
committer | Kevin Mook <kevin@kevinmook.com> | 2013-10-21 13:30:05 -0400 |
commit | a733e00b10e5f17a7fc70e55e9b1949a5e1128be (patch) | |
tree | 27e59ba2c4840ae470ff3fac9141e4476af2664a /activerecord/lib/active_record/tasks | |
parent | 19639c7184bf40054dcedbbfe00eff164abf133f (diff) | |
download | rails-a733e00b10e5f17a7fc70e55e9b1949a5e1128be.tar.gz rails-a733e00b10e5f17a7fc70e55e9b1949a5e1128be.tar.bz2 rails-a733e00b10e5f17a7fc70e55e9b1949a5e1128be.zip |
Fix loading a sql structure file on postgres when the file's path has whitespace in it
Diffstat (limited to 'activerecord/lib/active_record/tasks')
-rw-r--r-- | activerecord/lib/active_record/tasks/postgresql_database_tasks.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb b/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb index 4413330fab..3d02ee07d0 100644 --- a/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb +++ b/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb @@ -59,7 +59,7 @@ module ActiveRecord def structure_load(filename) set_psql_env - Kernel.system("psql -q -f #{filename} #{configuration['database']}") + Kernel.system("psql -q -f #{Shellwords.escape(filename)} #{configuration['database']}") end private |