Fix tootctl upgrade storage-schema failing to delete empty directories (#13593)

lolsob-rspec
Hanage999 2020-05-04 20:51:34 +09:00 committed by GitHub
parent e80d4479c7
commit 190768a28d
1 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ module Mastodon
FileUtils.mv(previous_path, upgraded_path) FileUtils.mv(previous_path, upgraded_path)
begin begin
FileUtils.rmdir(previous_path, parents: true) FileUtils.rmdir(File.dirname(previous_path), parents: true)
rescue Errno::ENOTEMPTY rescue Errno::ENOTEMPTY
# OK # OK
end end
@ -131,7 +131,7 @@ module Mastodon
unless dry_run? unless dry_run?
begin begin
FileUtils.rmdir(upgraded_path, parents: true) FileUtils.rmdir(File.dirname(upgraded_path), parents: true)
rescue Errno::ENOTEMPTY rescue Errno::ENOTEMPTY
# OK # OK
end end