mirror of
https://github.com/mastodon/mastodon.git
synced 2025-07-18 02:08:16 +00:00
Compare commits
11 Commits
1572e55ea9
...
9f9206fc94
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9f9206fc94 | ||
![]() |
74fc4dbacf | ||
![]() |
b23a68168a | ||
![]() |
bd769970fa | ||
![]() |
bb04f0b561 | ||
![]() |
ba3e30cf93 | ||
![]() |
b9638a6b82 | ||
![]() |
6434d8ab4b | ||
![]() |
a5ac53d326 | ||
![]() |
fbaca0c953 | ||
![]() |
03f888806a |
|
@ -2848,7 +2848,6 @@ a.account__display-name {
|
||||||
&__pane {
|
&__pane {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
pointer-events: none;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
min-width: 285px;
|
min-width: 285px;
|
||||||
|
@ -2860,7 +2859,6 @@ a.account__display-name {
|
||||||
&__inner {
|
&__inner {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 285px;
|
width: 285px;
|
||||||
pointer-events: auto;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,41 @@ module Mastodon::CLI
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
when :fog
|
when :fog
|
||||||
fail_with_message 'The fog storage driver is not supported for this operation at this time'
|
fog_directory = Paperclip::Attachment.default_options[:fog_directory]
|
||||||
|
connection = Fog::Storage.new(Paperclip::Attachment.default_options[:fog_credentials])
|
||||||
|
directory = connection.directories.get(fog_directory)
|
||||||
|
last_key = options[:start_after]
|
||||||
|
|
||||||
|
loop do
|
||||||
|
objects = begin
|
||||||
|
directory.files.all(prefix: prefix, marker: last_key, limit: 1000).to_a
|
||||||
|
rescue => e
|
||||||
|
progress.log(pastel.red("Error fetching list of files: #{e}"))
|
||||||
|
progress.log("If you want to continue from this point, add --start-after=#{last_key} to your command") if last_key
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
break if objects.empty?
|
||||||
|
|
||||||
|
last_key = objects.last.key
|
||||||
|
|
||||||
|
objects.each do |object|
|
||||||
|
path_segments = object.key.split('/')
|
||||||
|
progress.increment
|
||||||
|
next unless orphaned_file?(path_segments)
|
||||||
|
|
||||||
|
begin
|
||||||
|
object.destroy unless dry_run?
|
||||||
|
reclaimed_bytes += object.content_length
|
||||||
|
removed += 1
|
||||||
|
progress.log("Found and removed orphan: #{object.key}")
|
||||||
|
rescue => e
|
||||||
|
progress.log(pastel.red("Error processing #{object.key}: #{e}"))
|
||||||
|
end
|
||||||
|
rescue UnrecognizedOrphanType
|
||||||
|
progress.log(pastel.yellow("Unrecognized file found: #{object.key}"))
|
||||||
|
end
|
||||||
|
end
|
||||||
when :azure
|
when :azure
|
||||||
fail_with_message 'The azure storage driver is not supported for this operation at this time'
|
fail_with_message 'The azure storage driver is not supported for this operation at this time'
|
||||||
when :filesystem
|
when :filesystem
|
||||||
|
|
Loading…
Reference in New Issue
Block a user