mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #3602 from lukegb/patch-1
Fix LocalStore.remove_file to not raise if source doesn't exist
This commit is contained in:
@@ -14,7 +14,7 @@ module FileStore
|
||||
path = public_dir + url
|
||||
tombstone = public_dir + url.sub("/uploads/", "/tombstone/")
|
||||
FileUtils.mkdir_p(Pathname.new(tombstone).dirname)
|
||||
FileUtils.move(path, tombstone)
|
||||
FileUtils.move(path, tombstone, :force => true)
|
||||
rescue Errno::ENOENT
|
||||
# don't care if the file isn't there
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user