Merge pull request #46 from insales/fix_eacess

Закрываем еще случай ошибки Errno::EACCES: Permission denied @ dir_s_rmdir - /tmp
This commit is contained in:
Andrey Stikheev
2022-02-10 09:32:38 +03:00
committed by GitHub

View File

@@ -318,7 +318,8 @@ module Paperclip
FileUtils.rmdir(path)
break if File.exist?(path) # Ruby 1.9.2 does not raise if the removal failed.
end
rescue Errno::EEXIST, Errno::ENOTEMPTY, Errno::ENOENT, Errno::EINVAL, Errno::ENOTDIR, Errno::ESTALE => e
rescue Errno::EEXIST, Errno::EACCES, Errno::ENOTEMPTY,
Errno::ENOENT, Errno::EINVAL, Errno::ENOTDIR, Errno::ESTALE => _e
rescue SystemCallError => e
Rollbar.error(e, {path: path, initial_path: initial_path})
end