mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
'uploads:gather' should only work on local uploads
This commit is contained in:
parent
7783ba46fc
commit
71fe66c8c2
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue