summaryrefslogtreecommitdiffstats
path: root/app/file.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-02-07 12:36:37 -0800
committerGitHub <noreply@github.com>2017-02-07 12:36:37 -0800
commit487bb56a9b8f5c7a9efaabfc631f2f6c689ef74b (patch)
treea92bcbe004045581752c33dfd126c211300cda25 /app/file.go
parenteb767d2c1cb65724f25479144d68a9d102d32dfa (diff)
downloadchat-487bb56a9b8f5c7a9efaabfc631f2f6c689ef74b.tar.gz
chat-487bb56a9b8f5c7a9efaabfc631f2f6c689ef74b.tar.bz2
chat-487bb56a9b8f5c7a9efaabfc631f2f6c689ef74b.zip
Add caching for file infos (#5330)
Diffstat (limited to 'app/file.go')
-rw-r--r--app/file.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/file.go b/app/file.go
index 4ddf7ac2d..095e4d032 100644
--- a/app/file.go
+++ b/app/file.go
@@ -318,7 +318,7 @@ func MigrateFilenamesToFileInfos(post *model.Post) []*model.FileInfo {
return []*model.FileInfo{}
} else if newPost := result.Data.(*model.PostList).Posts[post.Id]; len(newPost.Filenames) != len(post.Filenames) {
// Another thread has already created FileInfos for this post, so just return those
- if result := <-Srv.Store.FileInfo().GetForPost(post.Id); result.Err != nil {
+ if result := <-Srv.Store.FileInfo().GetForPost(post.Id, false); result.Err != nil {
l4g.Error(utils.T("api.file.migrate_filenames_to_file_infos.get_post_file_infos_again.app_error"), post.Id, result.Err)
return []*model.FileInfo{}
} else {