Browse Source

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

closed-social-v3
Hanage999 4 years ago
committed by GitHub
parent
commit
ff72c0472f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      lib/mastodon/upgrade_cli.rb

+ 2
- 2
lib/mastodon/upgrade_cli.rb View File

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

Loading…
Cancel
Save