Mercurial > hg > orthanc
comparison OrthancServer/Sources/OrthancWebDav.cpp @ 4246:6c3721ff284c
simplification
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 13 Oct 2020 10:39:47 +0200 |
parents | c70df925151e |
children | f047e2734655 |
comparison
equal
deleted
inserted
replaced
4245:c70df925151e | 4246:6c3721ff284c |
---|---|
1167 const UriComponents& path, | 1167 const UriComponents& path, |
1168 const std::string& filename) | 1168 const std::string& filename) |
1169 { | 1169 { |
1170 MimeType mime; | 1170 MimeType mime; |
1171 std::string content; | 1171 std::string content; |
1172 boost::posix_time::ptime modification; | 1172 boost::posix_time::ptime modification; // Unused, let the date be set to "GetNow()" |
1173 | 1173 |
1174 UriComponents p = path; | 1174 UriComponents p = path; |
1175 p.push_back(filename); | 1175 p.push_back(filename); |
1176 | 1176 |
1177 if (GetFileContent(mime, content, modification, p)) | 1177 if (GetFileContent(mime, content, modification, p)) |
1178 { | 1178 { |
1179 std::unique_ptr<File> f(new File(filename)); | 1179 std::unique_ptr<File> f(new File(filename)); |
1180 f->SetMimeType(mime); | 1180 f->SetMimeType(mime); |
1181 f->SetContentLength(content.size()); | 1181 f->SetContentLength(content.size()); |
1182 f->SetCreationTime(modification); | |
1183 collection.AddResource(f.release()); | 1182 collection.AddResource(f.release()); |
1184 } | 1183 } |
1185 } | 1184 } |
1186 | 1185 |
1187 | 1186 |