/usr/lib/ruby/vendor_ruby/vim/addon_manager/upgrade_from_legacy.rb is in vim-addon-manager 0.5.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | module Vim
class AddonManager
def upgrade_from_legacy(addons)
addons.each do |addon|
upgrade_addon_from_legacy(addon, @target_dir)
end
end
def upgrade_addon_from_legacy(addon, target_dir)
if addon.metadata['legacy_files']
links = addon.metadata['legacy_files'].map do |f|
File.join(target_dir, f)
end.select do |f|
File.symlink?(f)
end
unless links.empty?
links.each do |f|
File.unlink(f)
end
addon.install(target_dir)
end
end
end
end
end
|