mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 10:50:26 -06:00
'uploads:gather' should only work on local uploads
This commit is contained in:
parent
7783ba46fc
commit
71fe66c8c2
@ -12,7 +12,9 @@ task "uploads:gather" => :environment do
|
||||
|
||||
puts "", "Gathering uploads for '#{current_db}'...", ""
|
||||
|
||||
Upload.where("url !~ '^\/uploads\/#{current_db}'").find_each do |upload|
|
||||
Upload.where("url ~ '^\/uploads\/'")
|
||||
.where("url !~ '^\/uploads\/#{current_db}'")
|
||||
.find_each do |upload|
|
||||
begin
|
||||
old_db = upload.url[/^\/uploads\/([^\/]+)\//, 1]
|
||||
from = upload.url.dup
|
||||
|
Loading…
Reference in New Issue
Block a user