summaryrefslogtreecommitdiff
path: root/src/HttpResponseCommand.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/HttpResponseCommand.cc')
-rw-r--r--src/HttpResponseCommand.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc
index 34ae1cc8..9e9477ab 100644
--- a/src/HttpResponseCommand.cc
+++ b/src/HttpResponseCommand.cc
@@ -249,8 +249,11 @@ bool HttpResponseCommand::executeInternal()
int64_t totalLength = httpResponse->getEntityLength();
fe->setLength(totalLength);
if (fe->getPath().empty()) {
- fe->setPath(util::createSafePath(getOption()->get(PREF_DIR),
- httpResponse->determineFilename()));
+ auto suffixPath =
+ util::createSafePath(httpResponse->determineFilename());
+
+ fe->setPath(util::applyDir(getOption()->get(PREF_DIR), suffixPath));
+ fe->setSuffixPath(suffixPath);
}
fe->setContentType(httpResponse->getContentType());
grp->preDownloadProcessing();