mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 21:02:48 +08: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:
commit
0f480ac629
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user