From 7045cb5d5cb6395fd954b4d5cf3a8bf8d57509a8 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 2 Apr 2020 05:28:51 +0200 Subject: [PATCH] Fix `tootctl media remove-orphans` ignoring `PAPERCLIP_ROOT_PATH` (#13375) Fix #13371 --- lib/mastodon/media_cli.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/media_cli.rb b/lib/mastodon/media_cli.rb index b4ad78fe51..08a8f10937 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)