summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-11-26 22:16:18 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-11-26 22:16:18 +0900
commitd0a0645836e2221148200d2da0ae9166f59f6bc3 (patch)
tree7b22a53d17422d363f51226576c7359c5e8c59ce
parent380e5aa451514b9fb10fc543a024ed7a70086b6c (diff)
We already replaced "-" with DEV_STDIN in LocalFilePathOptionHandler
-rw-r--r--src/download_helper.cc17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/download_helper.cc b/src/download_helper.cc
index 6de3d12e..9a19fe2f 100644
--- a/src/download_helper.cc
+++ b/src/download_helper.cc
@@ -525,17 +525,14 @@ bool createRequestGroupFromUriListParser(
std::shared_ptr<UriListParser> openUriListParser(const std::string& filename)
{
std::string listPath;
- if (filename == "-") {
- listPath = DEV_STDIN;
- }
- else {
- auto f = File(filename);
- if (!f.exists() || f.isDir()) {
- throw DL_ABORT_EX(fmt(EX_FILE_OPEN, filename.c_str(),
- "File not found or it is a directory"));
- }
- listPath = filename;
+
+ auto f = File(filename);
+ if (!f.exists() || f.isDir()) {
+ throw DL_ABORT_EX(fmt(EX_FILE_OPEN, filename.c_str(),
+ "File not found or it is a directory"));
}
+ listPath = filename;
+
return std::make_shared<UriListParser>(listPath);
}