Fix `tootctl media remove-orphans` ignoring `PAPERCLIP_ROOT_PATH` (#13375)

Fix #13371
lolsob-rspec
Eugen Rochko 2020-04-02 05:28:51 +02:00 committed by GitHub
parent 11deb933f5
commit 7045cb5d5c
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ module Mastodon
when :filesystem when :filesystem
require 'find' 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| Find.find(File.join(*[root_path, prefix].compact)) do |path|
next if File.directory?(path) next if File.directory?(path)