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:
Régis Hanol 2015-07-20 14:39:55 +02:00
commit 0f480ac629

View File

@ -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