diff options
author | Rémy Coutable <remy@rymai.me> | 2018-02-12 17:30:40 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-02-12 18:54:22 +0300 |
commit | 957ae8734b6babc481e8f186de848ba1fe914c0e (patch) | |
tree | 6cda50ea4c94ebff9b5bbfe2b2422a1f0858b616 | |
parent | 1582fe782788b390c78ada258bb0e2f2b1a8f1c7 (diff) |
Fix a transient failure in db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb where symlink already exists
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r-- | db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb b/db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb index 26b99b61424..c48f1c938d0 100644 --- a/db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb +++ b/db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb @@ -20,7 +20,7 @@ class CleanupMoveSystemUploadFolderSymlink < ActiveRecord::Migration def down if File.directory?(new_directory) say "Symlinking #{old_directory} -> #{new_directory}" - FileUtils.ln_s(new_directory, old_directory) + FileUtils.ln_s(new_directory, old_directory) unless File.exist?(old_directory) else say "#{new_directory} doesn't exist, skipping." end |