mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Restore UploadRecovery specs (#10543)
Originally disabled in 0c0192e. Upload specs now use separate paths for each spec worker.
Fixes an issue in UploadRecovery#recover_from_local – it didn't take into account the testing infix (e.g. test_0) in the uploads/tombstone paths.
This commit is contained in:
@@ -95,21 +95,14 @@ class UploadRecovery
|
||||
end
|
||||
|
||||
def recover_from_local(sha1:, user_id:)
|
||||
public_path = Rails.root.join("public")
|
||||
|
||||
@paths ||= begin
|
||||
Dir.glob(File.join(
|
||||
public_path,
|
||||
'uploads',
|
||||
'tombstone',
|
||||
RailsMultisite::ConnectionManagement.current_db,
|
||||
Discourse.store.tombstone_dir,
|
||||
'original',
|
||||
'**',
|
||||
'*.*'
|
||||
)).concat(Dir.glob(File.join(
|
||||
public_path,
|
||||
'uploads',
|
||||
RailsMultisite::ConnectionManagement.current_db,
|
||||
Discourse.store.upload_path,
|
||||
'original',
|
||||
'**',
|
||||
'*.*'
|
||||
|
||||
Reference in New Issue
Block a user