Update auth/initialize_database.rb
This commit is contained in:
parent
61bc30a679
commit
c452bbe94a
|
@ -8,17 +8,23 @@ def initialize_database
|
|||
database_path = DATA_LOCATION + DATABASE_SUBPATH
|
||||
file_path = DATA_LOCATION + FILE_STORAGE_LOCATION
|
||||
|
||||
unless File.directory?(DATA_LOCATION)
|
||||
puts "Checking if directory '#{DATA_LOCATION}' exists."
|
||||
unless Dir.exist(DATA_LOCATION)
|
||||
puts "Directory '#{DATA_LOCATION}' does not exist."
|
||||
Dir.mkdir(DATA_LOCATION)
|
||||
puts "Directory '#{DATA_LOCATION}' created successfully."
|
||||
end
|
||||
|
||||
unless File.directory?(database_path)
|
||||
puts "Checking if directory '#{database_path}' exists."
|
||||
unless Dir.exist(database_path)
|
||||
puts "Directory '#{database_path}' does not exist."
|
||||
Dir.mkdir(database_path)
|
||||
puts "Directory '#{database_path}' created successfully."
|
||||
end
|
||||
|
||||
unless File.directory?(file_path)
|
||||
puts "Checking if directory '#{file_path}' exists."
|
||||
unless Dir.exist(file_path)
|
||||
puts "Directory '#{file_path}' does not exist."
|
||||
Dir.mkdir(file_path)
|
||||
puts "Directory '#{file_path}' created successfully."
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue