Mercurial > hg > orthanc
diff OrthancFramework/Sources/HttpServer/HttpServer.cpp @ 4246:6c3721ff284c
simplification
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 13 Oct 2020 10:39:47 +0200 |
parents | ca2a55a62c81 |
children | f047e2734655 |
line wrap: on
line diff
--- a/OrthancFramework/Sources/HttpServer/HttpServer.cpp Sat Oct 10 11:23:11 2020 +0200 +++ b/OrthancFramework/Sources/HttpServer/HttpServer.cpp Tue Oct 13 10:39:47 2020 +0200 @@ -821,19 +821,17 @@ MimeType mime; std::string content; boost::posix_time::ptime modificationTime = boost::posix_time::second_clock::universal_time(); - + if (bucket->second->IsExistingFolder(path)) { if (depth == 0) { IWebDavBucket::Collection c; - c.AddResource(new IWebDavBucket::Folder("")); - c.Format(answer, uri, true /* include display name */); + c.Format(answer, uri); } else if (depth == 1) { IWebDavBucket::Collection c; - c.AddResource(new IWebDavBucket::Folder("")); // Necessary for empty folders if (!bucket->second->ListCollection(c, path)) { @@ -841,7 +839,7 @@ return true; } - c.Format(answer, uri, true /* include display name */); + c.Format(answer, uri); } else { @@ -869,12 +867,8 @@ throw OrthancException(ErrorCode_InternalError); } - // Nautilus doesn't work on DELETE, if "D:displayname" - // is included in the multi-status answer of PROPFIND at depth 1 - const bool includeDisplayName = (depth == 0); - p.resize(p.size() - 1); - c.Format(answer, Toolbox::FlattenUri(p), includeDisplayName); + c.Format(answer, Toolbox::FlattenUri(p)); } else {