Skip to content

Commit

Permalink
Check if file is a symlink before doing readlink
Browse files Browse the repository at this point in the history
  • Loading branch information
spohlenz committed Dec 13, 2014
1 parent c1c048f commit 6f7d85f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tinymce/rails/asset_installer.rb
Expand Up @@ -84,7 +84,7 @@ def move_asset(src, dest)

def symlink_asset(src, dest)
with_asset(src, dest) do |src, dest|
unless File.exists?(dest) && File.readlink(dest) == src
unless File.exists?(dest) && File.symlink?(dest) && File.readlink(dest) == src
logger.info "Creating symlink #{dest}"
FileUtils.ln_s(src, dest, :force => true)
else
Expand Down

0 comments on commit 6f7d85f

Please sign in to comment.