From: Eugen Rochko Date: Thu, 2 Apr 2020 03:28:51 +0000 (+0200) Subject: Fix `tootctl media remove-orphans` ignoring `PAPERCLIP_ROOT_PATH` (#13375) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=a9a063c0e983c5643178428327ca9907558c1f68;p=mastodon.git Fix `tootctl media remove-orphans` ignoring `PAPERCLIP_ROOT_PATH` (#13375) Fix #13371 --- diff --git a/lib/mastodon/media_cli.rb b/lib/mastodon/media_cli.rb index b4ad78fe5..08a8f1093 100644 --- a/lib/mastodon/media_cli.rb +++ b/lib/mastodon/media_cli.rb @@ -115,7 +115,7 @@ module Mastodon when :filesystem require 'find' - root_path = ENV.fetch('RAILS_ROOT_PATH', File.join(':rails_root', 'public', 'system')).gsub(':rails_root', Rails.root.to_s) + root_path = ENV.fetch('PAPERCLIP_ROOT_PATH', File.join(':rails_root', 'public', 'system')).gsub(':rails_root', Rails.root.to_s) Find.find(File.join(*[root_path, prefix].compact)) do |path| next if File.directory?(path)