Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Commit

Permalink
Use FileUtils.rm_f instead of the UNIX 'rm' command
Browse files Browse the repository at this point in the history
[#1327 state:resolved]
  • Loading branch information
postmodern authored and snusnu committed Oct 30, 2010
1 parent cd9d62e commit a92a9b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/dm-migrations/sql/sqlite.rb
@@ -1,5 +1,7 @@
require 'dm-migrations/sql/table'

require 'fileutils'

module SQL
module Sqlite

Expand All @@ -13,7 +15,7 @@ def table(table_name)

def recreate_database
DataMapper.logger.info "Dropping #{@uri.path}"
system "rm #{@uri.path}"
FileUtils.rm_f(@uri.path)
# do nothing, sqlite will automatically create the database file
end

Expand Down

0 comments on commit a92a9b3

Please sign in to comment.