changing shell command to use FileUtils
This commit is contained in:
parent
f1ae95fac9
commit
5d0700001e
1 changed files with 3 additions and 3 deletions
|
|
@ -11,7 +11,7 @@ module PhotoMover
|
||||||
|
|
||||||
albums.each do |album|
|
albums.each do |album|
|
||||||
album_dir = "#{user.id}/#{album.name}"
|
album_dir = "#{user.id}/#{album.name}"
|
||||||
`mkdir #{album_dir}`
|
FileUtils::mkdir_p album_dir
|
||||||
|
|
||||||
album.photos.each do |photo|
|
album.photos.each do |photo|
|
||||||
current_photo_location = "#{Rails.root}/public/uploads/images/#{photo.image_filename}"
|
current_photo_location = "#{Rails.root}/public/uploads/images/#{photo.image_filename}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue